You can install our site as a web app on your iOS device by utilizing the Add to Home Screen feature in Safari. Please see this thread for more details on this.
Note: This feature may not be available in some browsers.
So I have no experience with docker/grafana and can barely navigate github but managed to get Teslamate up and running on a intel NUC on my home network.
I'm interested in setting pages with fuel savings panels and things like carbon footprint. Has anyone done this? I saw Russinating shared a JSON for MPG on page 15 but I can't get it to work.
In what way can you not get it working?So I have no experience with docker/grafana and can barely navigate github but managed to get Teslamate up and running on a intel NUC on my home network.
I'm interested in setting pages with fuel savings panels and things like carbon footprint. Has anyone done this? I saw Russinating shared a JSON for MPG on page 15 but I can't get it to work.
So the only way I've found so far to import using the JSON is to go to create -> import -> import via panel json. I then plug in the below code. It creates a blank dashboard call MPG with no panels or data.In what way can you not get it working?
Are you not able to import the json into a dashboard?
Have you imported this and you get an error or no data?
What does the panel look like on your dashboard?
{
"datasource": "TeslaMate",
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"decimals": 0,
"format": "none",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 3,
"w": 2,
"x": 8,
"y": 6
},
"id": 65,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "mpg",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false,
"ymax": null,
"ymin": null
},
"tableColumn": "",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "select $__time(date), convert_km(odometer, '$length_unit') / ($chargecost/(104.8/100)*0.219969157) from positions where car_id = $car order by date desc limit 1;",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"thresholds": "",
"timeFrom": null,
"timeShift": null,
"title": "MPG",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [],
"valueName": "first"
}
Russinating has saved a panel not a dashboard, so some of the variables will be missing from any new dashboard.Maybe you're way past this, but to import a new dashboard you need to log into Grafana (as admin) which is bottom left and then you can import a new dashboard (click the + symbol thats now visible on the left and then import). Not tried it myself, I have just created custom dashboard.
There's a share dashboard option at the top of the screen.
What are you trying to see with the MPG dashboard as there's a trips dashboard with efficiency etc?
Yeah I've tried hitting the plus button and then clicking import and pasting in that code.Maybe you're way past this, but to import a new dashboard you need to log into Grafana (as admin) which is bottom left and then you can import a new dashboard (click the + symbol thats now visible on the left and then import). Not tried it myself, I have just created custom dashboard.
There's a share dashboard option at the top of the screen.
What are you trying to see with the MPG dashboard as there's a trips dashboard with efficiency etc?
I've got one of them. Slightly different calculation in that I've worked out the cost per mile of a 'gas' car In my case it was costing me £0.13 per mile. I'm sure you can work that out, but if not I'll find my formula. I've plugged that into my query and I get the cost savings which are equal to:Yeah I've tried hitting the plus button and then clicking import and pasting in that code.
What I'm interested in is a dashboard where I can plug in avg price per gal in my area and put in a typical MPG for a similar size vehicle and then compare how much gas savings I've incurred by driving electric.
Great thank you! Also I appreciate the max speed/power drives dashboard you post as well.I've got one of them. Slightly different calculation in that I've worked out the cost per mile of a 'gas' car In my case it was costing me £0.13 per mile. I'm sure you can work that out, but if not I'll find my formula. I've plugged that into my query and I get the cost savings which are equal to:
(Odometer miles * gas cost per mile) - total charging cost.
I've also got a £ sign, but you can change it for whatever currency you want.
Next post will have the code
What version of Teslamate are you running? There was a new one out this week. Have you updated Grafana? IIRC version 8 isn't supported by Teslamate and has been known to cause issues with locations (although I think that was only on the maps)Since 9/30 Teslamate drives and charges pages don't show sthe location. If I click to view details of the specific timestamp it will show location correctly. Anyone have this happen and know why? Example:
I'm pretty sure that question has been asked over on the Teslamate Github page. Might be worth looking there as the developer is very responsive to questions. There is also discussions page.Im trying to figure out how teslamate properly calculates my consumption, specifically total kwh and consumption (wh/km)
Im trying to follow the sql query for calculating "drives" for my car in grafana, it seems like it is mostly relying on EPA data, not actual data in the car, so I wonder how both correlate:
The total kwh is calculated based on efficiency, which is the official consumption that is reported for the car, multiplied by the rated range difference for a drive, which is based on the EPA estimation in the car. So the consumption reported is based on the range difference / battery percentage lost for a drive. How can it provide an actual number if the total size of the car battery is unknown?
Isnt it more accurate and "real" to rely on the car battery size than EPA metrics?
It provides difference compared to the data shown by the "trip" consumption in the car