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.
Hi I have set up the raspberry pi by following teslaev link.
I cannot log into it using VNC and get the following error message when using terminal.
can you please help?
I have done few reinstalls of RPI OS but no luck.
Thank you

WARNING: POSSIBLE DNS SPOOFING DETECTED! @

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

The ECDSA host key for raspberrypi.local has changed,

and the key for the corresponding IP address fe80::dea6:32ff:fec7:d4ce%en0

is unknown. This could either mean that

DNS SPOOFING is happening or the IP address for the host

and its host key have changed at the same time.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

Someone could be eavesdropping on you right now (man-in-the-middle attack)!

It is also possible that a host key has just been changed.

The fingerprint for the ECDSA key sent by the remote host is

SHA256:SF1wbQoGJFhOc+nUjaJtSoB3b/IhyEEI45Lew1T3q3U.

Please contact your system administrator.

Add correct host key in /Users/user1/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in /Users/user1/.ssh/known_hosts:2

ECDSA host key for raspberrypi.local has changed and you have requested strict checking.

Host key verification failed.
 
Hi I have set up the raspberry pi by following teslaev link.
I cannot log into it using VNC and get the following error message when using terminal.
can you please help?
I have done few reinstalls of RPI OS but no luck.
Thank you

The message you're seeing here is because the SSH fingerprint of the Pi has changed since the first time you connected, your Mac records it in a file called "known_hosts" in your profile. The reason the fingerprint changed is because you reinstalled the Pi, fingerprints are generated the very first time you start the Pi and otherwise don't change. Normally the only reason they do is because someone's trying to hijack your connection - and is why the Mac is warning you.

The fix here is an easy one, open up Terminal and run:
Code:
nano ~/.ssh/known_hosts

According to the error you pasted the line that has the issue is the second one (which contains raspberrypi.local) - you just need to delete that line, save the file (Ctrl + O, then press enter) and then retry your SSH connection.
 
  • Like
Reactions: Roy W. and DaveW
Anyone else recording a long drive in the car state dashboard yesterday that didn't occur?

2021-01-15 20_10_23-States - Grafana.png


Wonder if this is related to the Tesla API being down for a while yesterday, although that was less than an hour and my drive is being recorded as 6 hours.

These 2 short drives are the only entries in the Drives dashboard from yesterday:

2021-01-15 20_06_55-Drives - Grafana.png


It's didn't record the 0.8 mile return leg from that trip at around 3.20pm, presumably in line with when the Tesla API was down.
 
Hi

I am late to the party, only got my M3 late December and I was looking at the different options to get more info out of the Tesla. I’ve installed TeslaMate on my MacBookPro for now which is on most of the time (apart from reboots every couple of month).
I like what I am seeing so far with only a few days data but I have one problem with my setup. Even though I work from home, once the pandemic is over I would start driving into the office once a week again and during that time TeslaMate would not be able to receive the data.

So I am wondering, who is still checking a TeslaMate regularly after a year? Or is this singing you do for the first few month until you get a feeling for the consumption etc?
If this is something that is still useful in a years time, what is best route? Get a Raspberry pi or install it in the cloud (e.g. google)? I guess the cheapest is to do it with google? A new Pi4 with passive heat sink, SD card is probably around £100? I work in Software so I should be able to accomplish both options.
 
Hi

I am late to the party, only got my M3 late December and I was looking at the different options to get more info out of the Tesla. I’ve installed TeslaMate on my MacBookPro for now which is on most of the time (apart from reboots every couple of month).
I like what I am seeing so far with only a few days data but I have one problem with my setup. Even though I work from home, once the pandemic is over I would start driving into the office once a week again and during that time TeslaMate would not be able to receive the data.

So I am wondering, who is still checking a TeslaMate regularly after a year? Or is this singing you do for the first few month until you get a feeling for the consumption etc?
If this is something that is still useful in a years time, what is best route? Get a Raspberry pi or install it in the cloud (e.g. google)? I guess the cheapest is to do it with google? A new Pi4 with passive heat sink, SD card is probably around £100? I work in Software so I should be able to accomplish both options.
I'm still checking daily after about 6 months.

I started on a Pi4 but decided to move it to a cloud hosted server (vultr) as I wanted to securely access from the cloud and not worry about the Pi failing at any time. Also, the hosting provider manages nightly backups of the server, so one less thing to fiddle with.

I picked Vultr after the temporary block of GCP/AWS/Azure IP addresses. Vultr wasn't blocked at the timr but other providers were fine too such as Digital Ocean.

Lots of ways to do it though.
 
I've just set up TeslaMate on Google Cloud following the guide here: How to setup and run TeslaMate for free on Google Cloud - TeslaEV.co.uk

I've got two subdomains teslamate.mydomain.com and grafana.mydomain.com both point to the same IP.
I can log into TeslaMate on teslamate.mydomain.com but grafana does not seem to be configured correctly.
From the docker-compose.yml it looks like both TeslaMate and Grafana are being set up with the same domain
and indeed the TeslaMate doc Advanced installation with Traefik, Let's Encrypt & HTTP Basic Auth | TeslaMate says one domain.
It looks like the grafana is accessable via teslamate.mydomain.com/grafana.
The guide at teslaev.co.uk seems to miss the part where you have to change the configuration to use the second domain.

Before I try my luck at configuring the second domain, what is the benefit of using a second domain grafana.mydomain.com instead of teslamate.mydomain.uk/grafana?

I haven't worked with Traefik before but my guess is this would be the configuration for the yml file:

Code:
 - "traefik.enable=true"
      - "traefik.port=3000"
      - "traefik.http.middlewares.redirect.redirectscheme.scheme=https"
      - "traefik.http.middlewares.grafana-auth.basicauth.realm=teslamate"
      - "traefik.http.middlewares.grafana-auth.basicauth.usersfile=/auth/.htpasswd"
      - "traefik.http.routers.grafana-insecure.rule=Host(`${FQDN_GF}`)”
      - "traefik.http.routers.grafana-insecure.middlewares=redirect"
      - "traefik.http.routers.grafana.rule=Host(`${FQDN_GF}`) && Path(`/live/websocket`)"
      - "traefik.http.routers.grafana-ws.tls"
      - "traefik.http.routers.grafana.rule=Host(`${FQDN_GF}`)”
      - "traefik.http.routers.grafana.middlewares=grafana-auth”
      - "traefik.http.routers.grafana.entrypoints=websecure"
      - "traefik.http.routers.grafana.tls.certresolver=tmhttpchallenge"
and you add FQDN_GF=grafana.mydomain.com to the .env file?
 
Hi

I am late to the party, only got my M3 late December and I was looking at the different options to get more info out of the Tesla. I’ve installed TeslaMate on my MacBookPro for now which is on most of the time (apart from reboots every couple of month).
I like what I am seeing so far with only a few days data but I have one problem with my setup. Even though I work from home, once the pandemic is over I would start driving into the office once a week again and during that time TeslaMate would not be able to receive the data.

So I am wondering, who is still checking a TeslaMate regularly after a year? Or is this singing you do for the first few month until you get a feeling for the consumption etc?
If this is something that is still useful in a years time, what is best route? Get a Raspberry pi or install it in the cloud (e.g. google)? I guess the cheapest is to do it with google? A new Pi4 with passive heat sink, SD card is probably around £100? I work in Software so I should be able to accomplish both options.

I'm in month 4 and while I don't check it as frequently as when I first set it up I still do check it and usually when I have a question I want resolved.

I started out on vultr and moved to a pi mainly because I was being cheap and partially because at the time I was setting up a lot of online servers were blocked but not vultr. I wondered if it would happen again and decided I didn't want to find out.
 
I've just set up TeslaMate on Google Cloud following the guide here: How to setup and run TeslaMate for free on Google Cloud - TeslaEV.co.uk

I've got two subdomains teslamate.mydomain.com and grafana.mydomain.com both point to the same IP.
I can log into TeslaMate on teslamate.mydomain.com but grafana does not seem to be configured correctly.
From the docker-compose.yml it looks like both TeslaMate and Grafana are being set up with the same domain
and indeed the TeslaMate doc Advanced installation with Traefik, Let's Encrypt & HTTP Basic Auth | TeslaMate says one domain.
It looks like the grafana is accessable via teslamate.mydomain.com/grafana.
The guide at teslaev.co.uk seems to miss the part where you have to change the configuration to use the second domain.

Before I try my luck at configuring the second domain, what is the benefit of using a second domain grafana.mydomain.com instead of teslamate.mydomain.uk/grafana?

I haven't worked with Traefik before but my guess is this would be the configuration for the yml file:

Code:
 - "traefik.enable=true"
      - "traefik.port=3000"
      - "traefik.http.middlewares.redirect.redirectscheme.scheme=https"
      - "traefik.http.middlewares.grafana-auth.basicauth.realm=teslamate"
      - "traefik.http.middlewares.grafana-auth.basicauth.usersfile=/auth/.htpasswd"
      - "traefik.http.routers.grafana-insecure.rule=Host(`${FQDN_GF}`)”
      - "traefik.http.routers.grafana-insecure.middlewares=redirect"
      - "traefik.http.routers.grafana.rule=Host(`${FQDN_GF}`) && Path(`/live/websocket`)"
      - "traefik.http.routers.grafana-ws.tls"
      - "traefik.http.routers.grafana.rule=Host(`${FQDN_GF}`)”
      - "traefik.http.routers.grafana.middlewares=grafana-auth”
      - "traefik.http.routers.grafana.entrypoints=websecure"
      - "traefik.http.routers.grafana.tls.certresolver=tmhttpchallenge"
and you add FQDN_GF=grafana.mydomain.com to the .env file?

Looks like TM have updated their instructions, as when I wrote mine it was setup to have two domains.

I’ll revisit it this week (and finally sort out the google drive backup changes too - lots on :) )
 
  • Like
Reactions: ParHunter
As promised (although delayed, working from home and home schooling a 6 year old haven't done much for my productivity!) an updated guide for the Google Drive backups.

If you haven't set them up yet, then just crack on. If you've already got this running, then complete the Get a Google Client ID and Client Secret section, then scroll down to the bottom to edit your existing rclone config :)

How to perform an automated TeslaMate backup to Google Drive - TeslaEV.co.uk

Thanks to @StuC and @spooksman for helping me test the instructions and proving some helpful feedback.
 
  • Helpful
Reactions: Godsense
I'll add it to the list of things to sort / update :)

Dave; what a legend.
(unrelated, but my model 3's in car name is Dave)

Yesterday evening my wife was watching trash TV, so thought it a good time to dive in to teslamate and see if I could get it working. I'm fairly basic when it comes to linux things, as much as I find myself a little geeky, I really do need to lean on the gurus to get anything done. I have a pi 3B+ which I followed some guides a while back to set up a headless pihole for my house. So my goal was to use the same pi and not kill pihole.

From google (not from here) I came across your page www.teslaev.co.uk - what a gem! I followed your guide to get docker and teslamate set up and working with no issues at all (and pihole still works!). Then I set up backups to google drive, which also worked a treat following your instructions. My only tripping point here was that unknown to me, my pi timezone was set to GMT, not Sydney/Australia, so this was making my backup testing tricky! I confirmed it was working my testing to the next minute, but 3 am failed. I randomly noticed a 2pm backup created, which was when the penny dropped.

I also added the Australian superchargers from your list, it looks like it needs a refresh but I just edited the supercharging price in notepad++ and added in the only new supercharger I'm likely to use, before putting it all in to the terminal. Now I'm trying to convince myself that I don't need to set up a google cloud instance, I'll run this for some months and see how it goes.

Only question is, how big does the local database get with time? (I've got two cars on my account). I'm only using a 16GB card, so I guess at some point I'll be looking for a guide on how to keep all my data when upsizing storage!

Thanks for your great guides - and of course to those who built teslamate, if you read this thread.
 
  • Like
Reactions: DaveW and spooksman
Dave; what a legend.
(unrelated, but my model 3's in car name is Dave)

Yesterday evening my wife was watching trash TV, so thought it a good time to dive in to teslamate and see if I could get it working. I'm fairly basic when it comes to linux things, as much as I find myself a little geeky, I really do need to lean on the gurus to get anything done. I have a pi 3B+ which I followed some guides a while back to set up a headless pihole for my house. So my goal was to use the same pi and not kill pihole.

From google (not from here) I came across your page www.teslaev.co.uk - what a gem! I followed your guide to get docker and teslamate set up and working with no issues at all (and pihole still works!). Then I set up backups to google drive, which also worked a treat following your instructions. My only tripping point here was that unknown to me, my pi timezone was set to GMT, not Sydney/Australia, so this was making my backup testing tricky! I confirmed it was working my testing to the next minute, but 3 am failed. I randomly noticed a 2pm backup created, which was when the penny dropped.

I also added the Australian superchargers from your list, it looks like it needs a refresh but I just edited the supercharging price in notepad++ and added in the only new supercharger I'm likely to use, before putting it all in to the terminal. Now I'm trying to convince myself that I don't need to set up a google cloud instance, I'll run this for some months and see how it goes.

Only question is, how big does the local database get with time? (I've got two cars on my account). I'm only using a 16GB card, so I guess at some point I'll be looking for a guide on how to keep all my data when upsizing storage!

Thanks for your great guides - and of course to those who built teslamate, if you read this thread.

Thanks for the feedback, glad it worked out for you, Dave the Tesla too! :cool:

I'll update the Aus superchargers too, I've built the template to do them so should be much effort, I'll post back when it's sorted and tag you in.

Data wise, I've had mine running since around March, the backup is currently at 95mb however that's with not much driving at all due to lockdown, there would be a lot more data points by now. I'll probably update the guide again at some point to add in compression as it'll drop the backup down considerably, just adds an extra step in which isn't great when not everyone has linux knowledge (me included!).

If you are updating storage, you can just install TM again and then restore the backup from GDrive :)
 
  • Like
Reactions: alexeiw123
In addition to above - I've seen on git that this has been asked and it's an API quirk.
I wonder if it would feasible to add in a calculated number of phases, as it's pretty easy to work out from the other data given: Power, Current and Voltage.

P (in kW) = (phases x Voltage (phase) x Current (phase))/ 1000

So

phases = ( Power in kW x 1000 ) / ( Voltage x Current )

Just need to round to a whole number to account for rounding error.

I've never used git so not sure how to suggest this to the developer.
 
In addition to above - I've seen on git that this has been asked and it's an API quirk.
I wonder if it would feasible to add in a calculated number of phases, as it's pretty easy to work out from the other data given: Power, Current and Voltage.

P (in kW) = (phases x Voltage (phase) x Current (phase))/ 1000

So

phases = ( Power in kW x 1000 ) / ( Voltage x Current )

Just need to round to a whole number to account for rounding error.

I've never used git so not sure how to suggest this to the developer.

Can you log it as an issue (or update an existing issue) with your proposed solution?
 
  • Like
Reactions: alexeiw123