Import from TeslaFi (BETA)
Requirements
CREATE A BACKUP OF YOUR DATA‼️
If you have been using TeslaMate since before the 1.16 release, the docker-compose.yml needs to be updated. Add the following volume mapping to the
teslamate
service:services:
teslamate:
# ...
volumes:
- ./import:/opt/app/importExport your TeslaFi data (for one car) as CSV by month:
Settings -> Advanced -> Download TeslaFi Data
.- If you have a ton of TeslaFi data and don't want to deal with the UI, you can run this python script to export all data: Export from TeslaFi #563
Instructions
Copy the exported CSV files into a directory named
import
next to the docker-compose.yml:.
├── docker-compose.yml
└── import
├── TeslaFi82019.csv
├── TeslaFi92019.csv
├── TeslaFi102019.csv
├── TeslaFi112019.csv
└── TeslaFi122019.csvtipThe path of the import directory can be customized with the IMPORT_DIR environment variable.
Restart the teslamate service and open the TeslaMate admin interface. Now the import form should be displayed instead of the vehicle summary.
Since the raw data is in the local timezone (assigned by the home address in the TeslaFi settings page) you need to select your local timezone. Then start the import. On low-end hardware like the Raspberry Pi, importing a large data set spanning several years will take a couple of hours.
After the import is complete, empty the
import
directory (or remove but ensure docker doesn't have a volume mapping) and restart theteslamate
service.
If there is an overlap between the already existing TeslaMate and TeslaFi data, only the data prior to the first TeslaMate data will be imported.
Since the exported CSV files do not contain addresses, they are added automatically during and after the import. So please note that not all addresses are visible immediately after the import/restarting. Depending on the amount of data imported, it may take a while before they appear. The same applies to elevation data.