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.
This is fantastic. Running on a Pi and am impressed. Trying to extensively search but am having a hard time with this: What are the units for "cost" in the Geo-Fences setup for locations? I'm trying to add my home rate (in USD) at $0.10828 per kWh. This results in everything being off by roughly a factor of 100....but also seemingly inconsistent in how it's calculated. If I assume decimalization and enter in cents (or pence), the precision is completely unfit for the values. Can someone kindly point me to a reference for how to deal with this?

You would enter this as 0.10828 in the Cost field for your Home Geofence, I do the same with my rate of £0.055/kWh. However there looks to be a known issue with precision beyond 3 digits, there is an Issue for it on the Github already... along with a workaround to tweak the Database for it. You may want to comment here too if you're having trouble with precision beyond 3 decimal places!

Entering the cost per KWh value higher than 100 (three digits) is not possible · Issue #1064 · adriankumpf/teslamate
 
Last edited:
You would enter this as 0.10828 in the Cost field for your Home Geofence, I do the same with my rate of £0.055/kWh. However there looks to be a known issue with precision beyond 3 digits, there is an Issue for it on the Github already... along with a workaround to tweak the Database for it. You may want to comment here too if you're having trouble with precision beyond 3 decimal places!

Entering the cost per KWh value higher than 100 (three digits) is not possible · Issue #1064 · adriankumpf/teslamate

Excellent, thank you!
 
GCP and Digital Ocean guides updated for the new(ish) one subdomain setup.

USA Supercharger file updated @rsunny2012 if you just want the latest additions:

Code:
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Middletown, Ny Supercharger', 41.442795, -74.377247, 35, '2021-01-19 06:50:00 ', '2021-01-19 06:50:00 ', 0.24, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Bensalem, Pa Supercharger', 40.125289, -74.96407, 35, '2021-01-19 06:47:00 ', '2021-01-19 06:47:00 ', 0.24, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Tappahannock, Va Supercharger', 37.903873, -76.865803, 35, '2021-01-16 06:48:00 ', '2021-01-16 06:48:00 ', 0.21, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Rehoboth Beach, de Supercharger', 38.712616, -75.103793, 35, '2021-01-12 06:51:00 ', '2021-01-12 06:51:00 ', 0.22, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('San Mateo, Ca - Hillsdale Boulevard Supercharger', 37.533219, -122.327475, 35, '2021-01-12 06:47:00 ', '2021-01-12 06:47:00 ', 0.26, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Salt Lake City, Ut - South 300 West Supercharger', 40.746458, -111.900542, 35, '2021-01-05 06:49:00 ', '2021-01-08 09:19:00 ', 0.22, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Charlotte Supercharger', 35.34075, -80.76579, 35, '2021-01-05 06:48:00 ', '2021-01-05 06:48:00 ', 0.22, NULL);

AU Supercharger file updated (including changing to cost_per_unit) @alexeiw123 if you just want the latest additions:
Code:
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Wollongong Supercharger', -34.42787732762511, 150.89320179198262, 35, '2021-01-08 04:16:00 ', '2021-01-08 04:16:00 ', 0.42, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Maclean Supercharger', -29.427083, 153.239167, 35, '2020-12-22 06:35:00 ', '2020-12-22 06:35:00 ', 0.42, NULL);


Thanks Dave
 
Had a failed sd card on my Pi yesterday. Well it didn't fail but got corrupted due to improper shut downs and I decided to just start from scratch.

I've reinstalled Teslamate and thanks to @DaveW I had my automated backups going to google drive and have been able to restore my data.

I'm now trying to set up the automated backups again and getting stuck at this script.

I get an ERROR: .FileNotFoundError

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
now=`date +"%A"`
cd /home/pi/tmbackup
sudo /usr/local/bin/docker-compose exec -T database pg_dump -U teslamate teslamate > /home/pi/tmbackup/teslamate.bck_${now}
rclone copy --max-age 24h /home/pi/tmbackup --include 'teslamate.*' gdrive:TeslaMate


my docker-compose file is called docker-compose.teslamate.yml and I've tried using that in place of just docker-compose in line 4.

Any ideas what I could be doing wrong?
 
When you run the script manually @ElRey does it show which file isn't found?

Glad the backup worked, Google Drive is proving a bit problematic at the moment due to rate limiting and my workarounds aren't as effective as I hoped (although one more option to try!)

Thank you @DaveW. It would have been very sad to loose all of that data.

2 days before my laptop had something spilled in it and is gone for repairs.
My Home-Assistant and Unifi controller backups are stored locally on there so it's either wait to get the data or start afresh. :(

Anyway yes, It is saying "No such file or directory: '/docker-compose.teslamate.yml'
 
Last edited:
Thank you @DaveW. It would have been very sad to loose all of that data.

2 days before my laptop had something spilled in it and is gone for repairs.
My Home-Assistant and Unifi controller backups are stored locally on there so it's either wait to get the data or start afresh. :(

Anyway yes, It is saying "No such file or directory: '/docker-compose.teslamate.yml'

Revert it back to just docker-compose in the backup script (shouldn't need the yml here, it's just the compose command running) , does it then tell you what file is missing?
 
Revert it back to just docker-compose in the backup script (shouldn't need the yml here, it's just the compose command running) , does it then tell you what file is missing?
This is what I get if I run the script exactly as you've typed it.

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
 
V.1.21.2 has just dropped :)

I highly recommend installing this update ASAP, signing out (new option in the settings screen) and back in again.

Tesla have turned off the old V2 Auth and replaced with the V3, so if you don't do this and your token runs out, the data will stop flowing to TeslaMate until you update and sign back in.

Did mine tonight, nice and easy :)
 
Revert it back to just docker-compose in the backup script (shouldn't need the yml here, it's just the compose command running) , does it then tell you what file is missing?

Thanks for your help Dave, all sorted now.

I'll post what the issue was here in case someone else runs into this.

I had to edit this string "
sudo /usr/local/bin/docker-compose exec....." as it turns out for some reason my docker-compose is not installed there but in /usr/bin/docker-compose.

running $ whereis docker-compose revealed the location and once changed it worked like a charm. Since I was re-installing the pi TeslaMate got upgraded along so a win over the weekend.
 
  • Informative
Reactions: DaveW
Has anyone found that their car sleeps for 1 hour, wakes up for an hour, sleeps for an hour, etc? Car stored in garage, no one walking it, alerting it, etc. It used to sleep for days at a time when not used. I have tried shutting down the Tesla App in my iphone to see if that is causing it, but doesn't seem to make a difference...
 
Has anyone found that their car sleeps for 1 hour, wakes up for an hour, sleeps for an hour, etc? Car stored in garage, no one walking it, alerting it, etc. It used to sleep for days at a time when not used. I have tried shutting down the Tesla App in my iphone to see if that is causing it, but doesn't seem to make a difference...

I get exactly this when the temp's below about 6c, when above this then I get some 15 min wakes with hour sleeps
 
I get exactly this when the temp's below about 6c, when above this then I get some 15 min wakes with hour sleeps
Yep - mine does that consistently - Sleeps for an hour, wakes for 15 mins and then sleeps again....Weirdly, its decided to sleep for 4 hours straight today (for the first time ever) its not been driven, or the official Tesla app used, so im leaving it as is to see how long it deep sleeps. Maybe it wakes, sends back data to the mothership and then sleeps again, and if not used it xx hours falls into a deep sleep? Who knows...Sleeping has always been a mystery on Tesla's!
upload_2021-2-2_17-8-39.png