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.
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);
 
Updated @403 Forbidden

There's only 4, I'll paste them here too, but I'll try and make a point of keeping the links updated on the supercharger import page on my site :)

Code:
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Castlebellingham (N) Supercharger', 53.932387, -6.417532, 35, '2018-12-04 09:37:00 ', '2018-12-04 09:37:00 ', 0.29, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Castlebellingham (S) Supercharger', 53.924284, -6.411674, 35, '2018-11-06 10:58:00 ', '2018-11-06 10:58:00 ', 0.29, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Ballacolla Supercharger', 52.866921, -7.482089, 35, '2018-11-06 10:57:00 ', '2018-11-06 10:57:00 ', 0.29, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Birdhill Supercharger', 52.757822, -8.408856, 35, '2018-01-21 17:33:00 ', '2020-01-19 19:13:00 ', 0.29, NULL);
 
  • Like
Reactions: Roy W.
So this is more a techy question! For people that host teslamate on cloud providers (myself included) how secure is .htpasswd for auth for your own use? I think using SSL and htpasswd is enough but I'm just worried about private data getting out there. Just looking for other peoples thoughts etc :)
 
So this is more a techy question! For people that host teslamate on cloud providers (myself included) how secure is .htpasswd for auth for your own use? I think using SSL and htpasswd is enough but I'm just worried about private data getting out there. Just looking for other peoples thoughts etc :)

The issue with htpasswd files is that Apache doesn't do any sort of rate-limiting to prevent someone from bruteforcing your credentials. If you're watching your logs you will certainly see this going on, but if you're not checking or alerting on that activity you'll never know.

You could look to layer some additional protection by using something like Cloudflare in-front of your VPS, they have a guide on implementing rate limiting, and then blocking all traffic not originating from Cloudflare or your house. My preferred route for internet facing systems is to use something like the CSF firewall in combination with Webmin, and use the "Dynamic DNS" feature in CSF to automatically update the firewall whenever your home IP changes. CSF also includes port-scanning detection and will automatically ban IP addresses attempting to detect services on your system. You can also configure CSF to watch Apache's log files and ban IP addresses attempting to bruteforce you (similar to how Fail2Ban works).

In reality though the safest (and simplest) solution is to not permit any external access to your Teslamate installation. This is the approach I have taken, but crucially with OpenVPN so that I can dial back into my home network (I self host) while I'm away if I need to access my data. That can also be done on a VPS too, something like OpenVPN Access Server is ideal, it gives you a GUI to manage OpenVPN and without the hassle of managing lots of CLI config. It's intended for businesses but you get two concurrent connections free which is plenty for home use. If I'm out and about and need access to Teslamate, I just fire up the OpenVPN app on my phone, connect back to my house, and then login to Teslamate. Adds about 20-30 seconds... but that could even be automated if I was bothered enough by it!
 
  • Informative
Reactions: Zigway
I've had Teslamate running locally on a RaspberryPi for a few days and mostly looks good. Couple of things though - the interior and exterior temps show as n/a. Anything I need to do to make these show?
Also I can access it via my laptop browser (Chromebook) but doesn't let me from my phone. I'm connected to the same WiFi network so not trying to access from outside or anything. Any obvious reason for this?
 
The issue with htpasswd files is that Apache doesn't do any sort of rate-limiting to prevent someone from bruteforcing your credentials. If you're watching your logs you will certainly see this going on, but if you're not checking or alerting on that activity you'll never know.

You could look to layer some additional protection by using something like Cloudflare in-front of your VPS, they have a guide on implementing rate limiting, and then blocking all traffic not originating from Cloudflare or your house. My preferred route for internet facing systems is to use something like the CSF firewall in combination with Webmin, and use the "Dynamic DNS" feature in CSF to automatically update the firewall whenever your home IP changes. CSF also includes port-scanning detection and will automatically ban IP addresses attempting to detect services on your system. You can also configure CSF to watch Apache's log files and ban IP addresses attempting to bruteforce you (similar to how Fail2Ban works).

In reality though the safest (and simplest) solution is to not permit any external access to your Teslamate installation. This is the approach I have taken, but crucially with OpenVPN so that I can dial back into my home network (I self host) while I'm away if I need to access my data. That can also be done on a VPS too, something like OpenVPN Access Server is ideal, it gives you a GUI to manage OpenVPN and without the hassle of managing lots of CLI config. It's intended for businesses but you get two concurrent connections free which is plenty for home use. If I'm out and about and need access to Teslamate, I just fire up the OpenVPN app on my phone, connect back to my house, and then login to Teslamate. Adds about 20-30 seconds... but that could even be automated if I was bothered enough by it!
Thanks for all that! I was gonna try add two-way SSL but decided against it! Ive implemented OpenVPN access to a local install on a Raspberry Pi! So far it's working well!
 
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.
Just wanted to say a big thanks to DaveW for the excellent guides. I've updated my setup to use the single sub domain now and Google drive backup is working perfectly too.
 
I know this is the UK section but has anyone seen where I can locate Tesla Destination charger import for USA locations. Been searching and can't seem to locate :(

Hi @Handshake - just had a quick look and I'm afraid I can't help, the dataset is too big!

The max I seem to be able to pull into my google sheet to manipulate is 3500 any more than that and it errors out. Probably not the best idea to add that many in anyway, huge amount of information when unless you have a mega road trip planned probably won't be that helpful :)
 
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?
 
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?

Go into your geofenced location, unit rate is added there
 
@DaveW Any chance for Supercharger locations for Switzerland? That would be awesome!

Hi @webbah

Here you go, also added the file to the DropBox folder on the instructions page :)

Code:
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Affoltern Supercharger', 47.271211, 8.439433, 35, '2020-11-28 06:54:00 ', '2020-12-01 06:59:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Bulle Supercharger', 46.6243313, 7.0349921, 35, '2020-10-14 05:32:00 ', '2020-10-15 05:42:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Bussigny Supercharger', 46.555642, 6.561004, 35, '2019-06-21 06:03:00 ', '2019-06-22 05:55:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Dietikon Supercharger', 47.418125, 8.396816, 35, '2019-05-12 19:43:00 ', '2019-05-13 05:42:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Quinto Supercharger', 46.515263, 8.67061, 35, '2018-10-11 12:47:00 ', '2019-03-22 18:16:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Melide Supercharger', 45.954138, 8.950789, 35, '2018-05-05 05:55:00 ', '2019-07-20 18:55:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Valsana Hotel & Appartements', 46.783347, 9.68427, 35, '2018-02-01 07:05:00 ', '2019-04-20 05:34:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Kriegstetten Supercharger', 47.175529, 7.598728, 35, '2018-01-21 17:40:00 ', '2019-03-22 18:59:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Flüelen Supercharger', 46.912724, 8.622726, 35, '2018-01-21 15:52:00 ', '2019-03-22 18:27:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Oftringen Supercharger', 47.310734, 7.934924, 35, '2017-10-05 05:35:00 ', '2019-03-23 06:36:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Schaffhausen Supercharger', 47.720985, 8.646664, 35, '2017-06-01 06:14:00 ', '2019-03-22 18:20:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('St. Moritz Supercharger', 46.496797, 9.84272, 35, '2017-02-16 10:44:00 ', '2019-03-22 17:58:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Steg-Hohtenn Supercharger', 46.310323, 7.74971, 35, '2017-01-26 21:13:00 ', '2019-03-22 18:08:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Monte Ceneri Supercharger', 46.13916, 8.907291, 35, '2016-12-14 19:34:00 ', '2019-03-22 18:17:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Pratteln Supercharger', 47.524843, 7.682486, 35, '2016-12-14 17:24:00 ', '2019-07-30 09:20:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Dietlikon Supercharger', 47.413133, 8.616919, 35, '2016-12-14 16:39:00 ', '2019-03-22 18:17:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Maienfeld Supercharger', 47.003965, 9.525809, 35, '2016-12-14 15:59:00 ', '2019-03-22 19:21:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Rubigen Supercharger', 46.892094, 7.542931, 35, '2016-12-11 16:56:00 ', '2019-03-22 19:16:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Martigny Supercharger', 46.1266154484612, 7.06108749818235, 35, '2016-12-10 17:25:00 ', '2019-03-22 19:24:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Egerkingen Supercharger', 47.3265235, 7.80480880000005, 35, '2015-05-25 19:08:00 ', '2019-03-22 18:51:00 ', 0.3, NULL);
INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Beckenried Supercharger', 46.9711588581444, 8.45898978697869, 35, '2015-05-25 18:56:00 ', '2019-10-02 21:08:00 ', 0.3, NULL);
 
  • Like
Reactions: Roy W.