With this importer your data from your TeslaFi account can be imported into TeslaLogger.
- Log in to your TeslaFi account
- Open Settings - Account
- Scroll down to the Advanced section
- click on Download TeslaFi Data
- Select the year and month for which data should be exported
- Click on submit
- Save the file on your local computer
- Repeat the download for all months whose data you want to import into Teslalogger
- Go to Admin Panel / Settings / Credentials e.g. http://raspberry/admin/password.php
- Check the ID of your car to import.
- Edit TeslaFi-Import.exe.config - set value of CarId to the corresponding ID from Credentials pag
e.g. if your Car to import is 2 it should look like:
...
<setting name="CarId" serializeAs="String">
<value>2</value>
</setting>
...
Sometimes the import will fail, if you have very large import files especially on Raspberries because of the lack of enough RAM.
- Get the latest Teslalogger and TeslaFi Import tool from: https://github.com/bassmaster187/TeslaLogger/archive/refs/heads/master.zip
- Unzip it
- Go to TeslaLogger/bin
- To connect the TeslaFi Import Tool to Teslalogger's database you have to change the DBConnectionstring in TeslaFi-Import.exe.config :
...
<setting name="DBConnectionstring" serializeAs="String">
<value>Server=raspberry;Database=teslalogger;Uid=root;Password=teslalogger;</value>
</setting>
...
- Copy all CSV files into the directory with Tesla-Fi-Import.exe
- Start the Tesla-Fi-Import.exe (on Windows just double click it / on MacOS you need Mono to start it)
- Copy all CSV files into the directory: \\RASPBERRY\teslalogger
- Log in to Raspberry via ssh User: pi Password: teslalogger
- execute the following commands
sudo pkill mono
sudo service grafana-server stop
sudo service apache2 stop
cd /etc/teslalogger/
mono TeslaFi-Import.exe
please be patient, this may take a long time After it has done it's job, please reboot the Raspberry:
sudo reboot now
Copy all CSV files into the subdirectory of your docker-compose.yml file : TeslaLogger\bin
Get the container name of Teslalogger.
Docker PS
Open a shell into the docker container:
docker exec -it <container name> /bin/bash
Start the import:
cd /etc/teslalogger/
mono TeslaFi-Import.exe
please be patient, this may take a long time After it has done it's job, please reboot the Raspberry:
Restart your container.
TeslaFi data are only imported up to the first data set from the Teslalogger. If both systems were running at the same time, the import ends with the first data set from the Teslalogger.
Since TeslaFi does not contain any addresses, everything is empty after the import. If you restart the Teslalogger afterwards, it will geocode all addresses again. Depending on how much data you have, this takes a long time, because I only geocode every 5 seconds to avoid being blocked by OpenStreetMap.