TeslaMate – How to bulk import UK Supercharger locations

Now TeslaMate is up and running and performing automatic backups as expected, you can inject in the current UK Supercharger locations.

Connecting to the database

Firstly, ssh into your pi / box that TeslaMate is running on.

To access to the TeslaMate database, run the following command: docker exec -it teslamate_database_1 psql -U teslamate

If an error is returned, that it cannot find a database of this name, run: docker ps

This returns a list of running docker containers, you should then see the correct name of your database container, mine for example is pi_database_1


You can then adjust the command above (docker exec -it teslamate_database_1 psql -U teslamate) to the new value, in this example: docker exec -it pi_database_1 psql -U teslamate

Once connected, you can now check which geofence locations you already have listed with the following command: SELECT * FROM geofences;
If you already have some Superchargers you’ve already entered, I’d suggest removing them from the below list before importing.

Bulk importing

EDIT 5/10/2020 – This import list has been updated to reflect the new TeslaMate table in version 1.20, if you wish to use on an older version, you will need to search and replace the below text, swapping cost_per_unit with cost_per_kwh

Once you are ready to import, run the following:

INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Crawley SC Supercharger', 51.13687082038547, -0.1911608179539438, 35, '2020-12-16 06:33:00 ', '2020-12-16 06:33:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Banbury Cross Supercharger', 52.07293517090728, -1.3417527342347173, 35, '2020-12-08 06:33:00 ', '2020-12-08 06:33:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Edinburgh Newbridge Supercharger', 55.933919,-3.407793, 35, '2020-12-23 06:50:00 ', '2020-12-23 06:50:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Gridserve Braintree Supercharger', 51.85214557376324, 0.5219387754701756, 35, '2020-12-23 06:33:00 ', '2020-12-23 06:33:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Aberdeen Supercharger', 57.110318, -2.092522, 35, '2020-12-18 06:33:00 ', '2020-12-18 06:33:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Chelmsford', 51.7501215, 0.5106861, 35, '2020-12-11 09:47:00 ', '2020-12-11 09:47:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Birmingham-St Andrews', 52.471144, -1.873503, 35, '2020-11-28 06:58:00 ', '2020-11-29 08:59:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Solstice Park', 51.1776742514546, -1.75851994550499, 35, '2020-10-09 20:20:00 ', '2020-12-11 09:47:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, 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_unit, 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_unit, 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);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Wyboston Supercharger', 52.202366, -0.291631, 35, '2020-08-27 05:36:00 ', '2020-09-06 05:26:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Hilton Park, Southbound Supercharger', 52.644065, -2.054251, 35, '2020-08-09 05:29:00 ', '2020-08-09 05:29:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Leeds-Whitehouse Street Supercharger', 53.784556, -1.532498, 35, '2020-08-09 05:27:00 ', '2020-08-09 05:27:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Colchester', 51.88071, 0.788574, 35, '2020-07-02 10:04:00 ', '2020-07-02 10:04:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Hilton Park Northbound Supercharger', 52.644021, -2.058587, 35, '2020-07-02 09:58:00 ', '2020-07-02 09:58:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Edinburgh Supercharger', 55.9453739, -3.3671657, 35, '2020-05-21 15:54:00 ', '2020-09-06 08:24:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Bristol-Lysander Road Supercharger', 51.522884, -2.609229, 35, '2020-03-25 07:11:00 ', '2020-03-25 07:11:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('North Greenwich Supercharger', 51.502543, -0.000031, 35, '2020-01-09 21:21:00 ', '2020-01-09 21:21:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Park Royal Supercharger', 51.52681, -0.283526, 35, '2019-12-30 21:28:00 ', '2019-12-30 21:28:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Eurocentral Supercharger', 55.835905, -3.984377, 35, '2019-12-30 21:24:00 ', '2019-12-30 21:24:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Manchester-South Supercharger', 53.430272, -2.179346, 35, '2019-11-12 11:21:00 ', '2020-09-06 05:27:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Wokingham Supercharger', 51.428333, -0.898835, 35, '2019-09-21 05:29:00 ', '2019-09-21 05:29:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('The Royal Crescent Hotel & Spa', 51.387342, -2.368139, 35, '2019-04-19 05:56:00 ', '2020-09-21 05:31:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Liphook Supercharger', 51.07658520408873, -0.8319181547401513, 35, '2019-03-03 20:53:00 ', '2020-05-20 07:44:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('London-Brent Cross', 51.576293, -0.223638, 35, '2019-02-15 06:29:00 ', '2020-06-01 18:35:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Perth Supercharger', 56.386024, -3.479455, 35, '2019-02-11 19:39:00 ', '2019-04-06 06:12:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Membury Eastbound Supercharger', 51.483904, -1.556787, 35, '2018-10-04 17:32:00 ', '2019-03-22 18:21:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Burtonwood Supercharger', 53.417576, -2.639682, 35, '2018-10-04 17:31:00 ', '2019-03-22 18:25:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Scotch Corner Supercharger', 54.442066, -1.671229, 35, '2018-08-19 20:10:00 ', '2019-03-22 19:04:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Kent Bluewater', 51.438598, 0.26944, 35, '2018-06-12 05:28:00 ', '2019-03-22 19:10:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Aviemore Supercharger', 57.189837, -3.836126, 35, '2018-04-15 17:51:00 ', '2018-07-17 20:28:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Fleet Supercharger (Eastbound)', 51.296116, -0.857413, 35, '2018-03-16 06:45:00 ', '2019-11-11 19:51:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Membury Westbound Supercharger', 51.481232, -1.556154, 35, '2018-03-16 06:43:00 ', '2019-03-22 17:53:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Portsmouth Supercharger', 50.847768, -0.991083, 35, '2018-01-21 17:50:00 ', '2020-05-20 07:44:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Penrith, UK - Tebay Southbound Supercharger', 54.453346, -2.605861, 35, '2017-10-05 05:35:00 ', '2019-03-22 19:12:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Telford Supercharger', 52.67744, -2.399171, 35, '2017-10-05 05:31:00 ', '2019-03-22 19:10:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Keele Northbound Supercharger', 52.99296, -2.290314, 35, '2017-09-27 19:34:00 ', '2020-05-20 07:42:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Michaelwood Northbound Supercharger', 51.656236, -2.434815, 35, '2017-09-09 05:45:00 ', '2019-03-22 18:29:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Lifton Supercharger', 50.643682, -4.284655, 35, '2017-08-24 05:58:00 ', '2020-09-06 05:27:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Warwick - Southbound Supercharger', 52.21917, -1.501274, 35, '2017-07-20 13:14:00 ', '2019-03-22 18:30:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Newport Pagnell - Southbound Supercharger', 52.084312, -0.748467, 35, '2017-07-20 13:12:00 ', '2019-03-22 19:22:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Woodall Southbound Supercharger', 53.314145, -1.281904, 35, '2017-07-20 13:11:00 ', '2019-03-22 18:52:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Warwick - Northbound Supercharger', 52.216065, -1.504796, 35, '2017-07-20 05:35:00 ', '2019-03-22 18:14:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Grantham Supercharger', 52.9486, -0.678092, 35, '2017-05-04 05:25:00 ', '2019-11-05 10:23:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Heathrow Supercharger', 51.478172, -0.515604, 35, '2017-01-30 18:21:00 ', '2019-12-30 21:27:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Bristol - Cribbs Causeway Supercharger', 51.5266939, -2.5998056, 35, '2017-01-30 12:14:00 ', '2019-03-22 18:57:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Charnock Richard (Northbound) Supercharger', 53.6305, -2.692696, 35, '2017-01-26 17:08:00 ', '2019-03-22 18:53:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Sarn Supercharger', 51.535351, -3.577637, 35, '2016-12-14 20:26:00 ', '2019-03-22 19:18:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Thetford Supercharger', 52.3864340032538, 0.664575154596383, 35, '2016-12-14 16:03:00 ', '2019-03-22 19:15:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Dundee Supercharger', 56.466441, -3.06297, 35, '2016-12-02 11:55:00 ', '2020-05-25 06:02:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Gordano Services Tesla Supercharger', 51.477207, -2.706308, 35, '2016-06-04 13:31:00 ', '2019-03-22 18:33:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Leeds Supercharger', 53.7327968290385, -1.58561217301633, 35, '2016-01-07 12:00:00 ', '2020-05-20 07:42:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Washington Supercharger', 54.887478, -1.558090, 35, '2016-01-07 11:56:00 ', '2019-03-22 18:23:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Barnsley Supercharger', 53.489393, -1.486223, 35, '2016-01-07 11:52:00 ', '2020-05-20 07:42:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Gretna Green Supercharger', 55.0078097331744, -3.08308660984039, 35, '2016-01-07 11:39:00 ', '2020-05-20 07:42:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('London Westfield', 51.50786616526031, -0.22189682615828588, 35, '2016-01-07 10:54:00 ', '2020-05-20 07:43:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Birchanger Green Supercharger', 51.871092935199, 0.194248193670647, 35, '2016-01-07 10:44:00 ', '2020-05-20 07:43:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Folkestone - Eurotunnel Terminal Supercharger', 51.09707, 1.12045220000005, 35, '2016-01-07 10:39:00 ', '2020-05-20 07:44:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Tesla London Heathrow', 51.5108870362645, -0.46055382803343, 35, '2016-01-07 10:20:00 ', '2020-05-20 07:43:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Keele Southbound Supercharger', 52.994202, -2.290657, 35, '2016-01-07 10:14:00 ', '2020-05-20 07:42:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Tesla London - The Royal Victoria Docks Supercharger', 51.5077191, 0.0158608000000413, 35, '2016-01-07 10:06:00 ', '2019-03-22 17:56:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Abington Supercharger', 55.5079186437005, -3.69485705344232, 35, '2016-01-07 09:58:00 ', '2020-05-20 07:42:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Northampton Supercharger', 52.18594940126778, -0.890303765343333, 35, '2016-01-01 23:12:00 ', '2020-05-20 07:43:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Warrington Supercharger', 53.3398741055015, -2.57107578559725, 35, '2015-12-30 15:23:00 ', '2020-05-20 07:42:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Tesla London Tower Supercharger / Tower Hotel', 51.5065987, -0.073373800000013, 35, '2015-12-30 00:17:00 ', '2019-03-22 17:50:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Dartford Supercharger', 51.4381027419786, 0.268897965070218, 35, '2015-12-28 10:42:00 ', '2020-05-20 07:44:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Maidstone Supercharger', 51.2862198625406, 0.546082494659443, 35, '2015-12-28 10:38:00 ', '2020-05-20 07:44:00 ', 0.24, NULL);
 INSERT INTO public.geofences (name, latitude, longitude, radius, inserted_at, updated_at, cost_per_unit, session_fee) VALUES ('Hopwood Park Supercharger', 52.3636114765698, -1.94638252258301, 35, '2015-11-20 08:37:00 ', '2020-05-20 07:43:00 ', 0.24, NULL);

Removing entries

If you want to remove any entries, you can either do so via the command line, or via the geo-fences section within TeslaMate (http://raspberrypi:4000/geo-fences – replacing raspberrypi with whatever the name of your pi is called)

To do it via the command line, first you need to run: SELECT * FROM geofences;
Once you have the ID of the entry you wish to remove, you can delete it with the following command (replacing XX with the relevant ID you got from the above command: DELETE FROM geofences WHERE id = XX;

Quit out of the DB session

run \q to quit

Free Supercharing

If you have free miles to use, or have an S or an X with free Supercharging, you can select that option under settings (http://raspberrypi:4000/settings – replacing raspberrypi with whatever the name of your pi is called).

EDIT – The free supercharging option doesn’t appear to do much for me, I had to click on the charging session and drop the price to 0.

Destination chargers

You can now do the same and bulk add the Tesla UK destination charger network into TeslaMate

Other countries Superchargers

I’ve started uploading all the Supercharger locations I’ve been asked for (to bulk import) onto my DropBox, word of warning though, the prices are in the local currency, there is no conversion. I suggest only importing prices for the country you are in and manually adding in the prices once you’ve been charged elsewhere.

You could do a find a replace on the cost within the text and replace with 0 if you wanted to import these.

Other Supercharger destinations to import

Thanks

Thanks to dakaix on the TMC forums for the information on the list and steps on how to insert this data, posted with his permission 🙂