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.
Think I've got it all looking how I want now! I'm more interested in total stats rather than current state so created a new overview dashboard, and figured out how to calc fuel savings with the Grafana/SQL syntax.

5fVaP8J.png
This looks amazing! And thanks for the code. I tried importing it, but mine looks all squashed for some reason. Where do you input the values for electricity and diesel to make the cost calculations?
 
OK, you'll need to SFTP to the Pi (either PI IP address or hostname) using your Pi login details, download the latest backup from Google Drive, copy it over using SFTP, then follow the restore section of the backup / restore options page (Backup and Restore | TeslaMate) replacing the filename with the one you've uploaded

Then run docker-compose up -d again to start things up once complete :)
 
OK, you'll need to SFTP to the Pi (either PI IP address or hostname) using your Pi login details, download the latest backup from Google Drive, copy it over using SFTP, then follow the restore section of the backup / restore options page (Backup and Restore | TeslaMate) replacing the filename with the one you've uploaded

Then run docker-compose up -d again to start things up once complete :)
Brill, thanks for that :)
 
  • Like
Reactions: Roy W.
This looks amazing! And thanks for the code. I tried importing it, but mine looks all squashed for some reason. Where do you input the values for electricity and diesel to make the cost calculations?

That does look amazing. Was the code shared on here? I looked but can't seem to find it.


Also does anyone know if there's a way to set teslamate to charge a certain amount daily regardless of how long or how many times it's charged at a particular location.

Where I park, I'm charged a flat rate of about £1 a day. Charge or not and I'd like to input that without having to do it manually.
 
That does look amazing. Was the code shared on here? I looked but can't seem to find it.


Also does anyone know if there's a way to set teslamate to charge a certain amount daily regardless of how long or how many times it's charged at a particular location.

Where I park, I'm charged a flat rate of about £1 a day. Charge or not and I'd like to input that without having to do it manually.

Under geofences for that location, can you not put it in as 0.00 but with the session fee of £1? If you plug in multiple times though, it'll register the session fee for those times
 
  • Disagree
Reactions: ElijahEVMan
Under geofences for that location, can you not put it in as 0.00 but with the session fee of £1? If you plug in multiple times though, it'll register the session fee for those times
Yes that's my issue. I don't want it to register as that multiple times. Also hoping I can input the cost per day and it would be able to work out and charge me every day regardless. Similar to a charge master monthly plan.
 
  • Disagree
Reactions: ElijahEVMan
Getting there:

View attachment 587481

Edit: Sods law, as soon as I posted that I got an error:

Code:
{%DBConnection.EncodeError{ message: "Postgrex expected an integer in -32768..32767, got 43227. Please make sure the value you are passing matches the definition in your table or in your query or convert the value accordingly." }, [ {Postgrex.DefaultTypes, :encode_params, 3, [file: 'lib/postgrex/type_module.ex', line: 897]}, {DBConnection.Query.Postgrex.Query, :encode, 3, [file: 'lib/postgrex/query.ex', line: 75]}, {DBConnection, :encode, 5, [file: 'lib/db_connection.ex', line: 1148]}, {DBConnection, :run_prepare_execute, 5, [file: 'lib/db_connection.ex', line: 1246]}, {DBConnection, :parsed_prepare_execute, 5, [file: 'lib/db_connection.ex', line: 539]}, {DBConnection, :prepare_execute, 4, [file: 'lib/db_connection.ex', line: 532]}, {Postgrex, :query, 4, [file: 'lib/postgrex.ex', line: 202]}, {Ecto.Adapters.SQL, :struct, 10, [file: 'lib/ecto/adapters/sql.ex', line: 630]} ]}
Finally managed to resolve the import error.

  1. Deleted almost all of the data from the existing tables
  2. Changed the data type from `smallint` to `integer` in a few tables
  3. Re-ran the import

I now have all my TeslaFi data imported, next to focus on the front end.

Although I can see the benefits of using TeslaMate over TeslaFi the setup does feel a bit like a busman's holiday. If TeslaFi could update their UI and if the uncertainty over their rights to use the API were resolved, I'd be inclined to stick with them.
 
Google Drive Backup Error -

Hi everyone I followed the instructions at How to perform an automated TeslaMate backup to Google Drive - TeslaEV.co.uk

And I looked and I do have a docker-compose.yml file in my /usr/local/bin folder. I am receiving the following error when running the script:
ERROR:

Can't find a suitable configuration file in this directory or any

parent. Are you in the right directory?


Supported filenames: docker-compose.yml, docker-compose.yaml


My TeslaMate docker install is located in /home/pi/TeslaMate folder, should the backup script have any modifications from the standard one?

Thanks
 
Google Drive Backup Error -

Hi everyone I followed the instructions at How to perform an automated TeslaMate backup to Google Drive - TeslaEV.co.uk

And I looked and I do have a docker-compose.yml file in my /usr/local/bin folder. I am receiving the following error when running the script:
ERROR:

Can't find a suitable configuration file in this directory or any

parent. Are you in the right directory?


Supported filenames: docker-compose.yml, docker-compose.yaml


My TeslaMate docker install is located in /home/pi/TeslaMate folder, should the backup script have any modifications from the standard one?

Thanks

Hi @MMcKay

Can you run a TeslaMate backup manually?

docker-compose exec -T database pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck
 
Hi @MMcKay

Can you run a TeslaMate backup manually?

docker-compose exec -T database pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck

Hi Dave,

Thanks so much for the quick reply, if I run the command from the tmbackup folder it fails with the same error, if I run it from the TeslaMate folder with just sudo before it I get a permission error. When I do sudo -i and run the backup commandfrom the TeslaMate folder it works.

After this test I created the tmback.sh file in my /home/pi/TeslaMate folder and updated the script so it first goes to the /home/pi/TeslaMate folder and then run the backup command and it works great!



thanks
Mike
 
Last edited:
  • Like
Reactions: DaveW
Hi Dave,

Thanks so much for the quick reply, if I run the command from the tmbackup folder it fails with the same error, if I run it from the TeslaMate folder with just sudo before it I get a permission error. When I do sudo -i and run the backup commandfrom the TeslaMate folder it works.

After this test I created the tmback.sh file in my /home/pi/TeslaMate folder and updated the script so it first goes to the /home/pi/TeslaMate folder and then run the backup command and it works great!



thanks
Mike

Glad you got it working Mike :)
 
So I managed to get TM working no problems thanks to @DaveW guide - Really great thanks.

Wanted to go on to make some tweaks however it keeps rejecting my password, 99% sure its right. I did initially have problems with the username i've tried,

SSH:
pi
[email protected]
[email protected] (got from router no problem)

All new to me, I guess I will end up with a fresh install, unless anyone has any advice? Is it case sensitive ?
 
  • Like
Reactions: DaveW
Whilst I'm looking at the USA ones, here's the latest UK ones since Wyboston :)

Code:
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_kwh, session_fee) VALUES ('Inverness Supercharger', 57.4817062715494, -4.22533406257412, 35, '2020-10-02 08:32:00 ', '2020-10-03 19:15:00 ', 0.24, NULL);  
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_kwh, session_fee) VALUES ('Fort William Supercharger', 56.82136054871131, -5.103586528903179, 35, '2020-10-02 08:26:00 ', '2020-10-03 19:16:00 ', 0.24, NULL);  
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_kwh, session_fee) VALUES ('Amesbury Supercharger', 51.177232888168476, -1.7560035733434916, 35, '2020-10-01 22:11:00 ', '2020-10-02 05:12:00 ', 0.24, NULL);

Full list and instructions here: TeslaMate - How to bulk import UK Supercharger locations - TeslaEV.co.uk
 
So I managed to get TM working no problems thanks to @DaveW guide - Really great thanks.

Wanted to go on to make some tweaks however it keeps rejecting my password, 99% sure its right. I did initially have problems with the username i've tried,

SSH:
pi
[email protected]
[email protected] (got from router no problem)

All new to me, I guess I will end up with a fresh install, unless anyone has any advice? Is it case sensitive ?

So running ssh [email protected] or ssh [email protected] prompts you for a password, but it's not accepted? As a test, if you were too try: ssh [email protected] does it still prompt for a password or tell you host not found (or similar)?