Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

TeslaMate [megathread]

This site may earn commission on affiliate links.
No. The car doesn't make that visible to the API. Not sure it even records that.
The car knows about it - it is the green area on the energy graphs.

It is actually in the API too, Teslamate displays it - the yellow trace below is power, anything below the zero line is regen. But I'm guessing the API isn't outputting a rolling sum of all regen for Teslamate to use though.

1640959665003.png
 
  • Like
Reactions: cwanja and jonpho
I am not sure if this is the right thread (90 pages - phew!). I have been running TM (TeslaMate) for a while, and I finally go around to posting instructions on how to get this up and running on Azure in a Ubuntu VM. This has been one of the instances how I have ran it for some time now and I wanted to share it back with the community in case anyone wasn't comfortable and wanted to see all the steps and details. Sorry its a long post.

More here if anyone is interested:
Curious - what is the benefit to getting access to the data outside of your house? Would it not be more secure to have a VPN back to your LAN and access it that way than exposing it to the internet?
 
  • Like
Reactions: 26ct2143
Curious - what is the benefit to getting access to the data outside of your house? Would it not be more secure to have a VPN back to your LAN and access it that way than exposing it to the internet?

Yeah this is what I've chosen to do. I'm running Teslamate on my little Hyper-V host at home, and then if I want to access it out and about I'll just VPN back to my home network. Its cheaper (and I think more secure) than running it in Azure or any of the other hosting providers.
 
  • Like
Reactions: cwanja and MrT3
I generate the tokens on a different system and log back in that way.

When I accessed the Teslamate link it just presented the request for the Tesla login.

When I accessed Grafana it showed no charge level since sometime overnight which I guess was when Tesla expired it. No other warning here.
 
I generate the tokens on a different system and log back in that way.

When I accessed the Teslamate link it just presented the request for the Tesla login.

When I accessed Grafana it showed no charge level since sometime overnight which I guess was when Tesla expired it. No other warning here.
Grafana won't know the database has stopped updating - although it would probably be easy to create a dashboard for that. Tonight's homework :)
 
MQTT seems to be the way to get automated alerts when the health check fails. I don't know enough about MQTT to set that up, but here's a panel to display the last time the start_date in states was updated:

{
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
},
"unit": "dateTimeFromNow"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"x": 17,
"y": 1
},
"id": 42,
"options": {
"reduceOptions": {
"values": true,
"calcs": [
"lastNotNull"
],
"fields": "/^start_date$/"
},
"orientation": "auto",
"text": {},
"textMode": "auto",
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
},
"pluginVersion": "7.5.11",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n start_date\nFROM states\nORDER BY start_date desc\nLIMIT 1",
"refId": "A",
"select": [
[
{
"params": [
"odometer"
],
"type": "column"
}
]
],
"table": "positions",
"timeColumn": "date",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Last states update",
"type": "stat",
"scopedVars": {
"car_id": {
"text": "Tonto",
"value": "1",
"selected": false
}
},
"timeFrom": null,
"timeShift": null,
"datasource": null
}
 
It might be worth checking you are still logged in, Tesla seem to have expired lots of credentials including mine in Teslamate. I only found out because I could not log into mytesla without resetting my password
Resetting of API tokens might be related to the news of that individual stating that he has "access to 20 Tesla vehicles in 13 counties" due to a third-party app / users leaking their credentials.
 
  • Like
Reactions: Marvin03