Import from TeslaMate

Tessie can import your driving and charging data from TeslaMate.

Export from a normal Docker installation

In a shell, navigate to your TeslaMate directory and run our magic one-line command:

docker-compose exec -T database psql -U $(docker-compose exec -T database env | grep POSTGRES_USER | cut -d"=" -f2) -d $(docker-compose exec -T database env | grep POSTGRES_DB | cut -d"=" -f2) -c "\copy (SELECT cars.vin, date, latitude, longitude, speed, power, odometer, ideal_battery_range_km, battery_level, outside_temp, elevation, fan_status, driver_temp_setting, passenger_temp_setting, is_climate_on, is_rear_defroster_on, is_front_defroster_on, inside_temp, battery_heater, battery_heater_on, battery_heater_no_power, est_battery_range_km, rated_battery_range_km, usable_battery_level, NULL AS charge_energy_added, NULL AS charger_actual_current, NULL AS charger_phases, NULL AS charger_pilot_current, NULL AS charger_power, NULL AS charger_voltage, NULL AS fast_charger_present, NULL AS conn_charge_cable, NULL AS fast_charger_brand, NULL AS fast_charger_type, NULL AS not_enough_power_to_heat FROM positions INNER JOIN cars ON cars.id = positions.car_id WHERE usable_battery_level IS NOT NULL UNION SELECT cars.vin, c.date, positions.latitude, positions.longitude, NULL AS speed, NULL AS power, NULL AS odometer, c.ideal_battery_range_km, c.battery_level, c.outside_temp, NULL AS elevation, NULL AS fan_status, NULL AS driver_temp_setting, NULL AS passenger_temp_setting, NULL AS is_climate_on, NULL AS is_rear_defroster_on, NULL AS is_front_defroster_on, NULL AS inside_temp, c.battery_heater, c.battery_heater_on, c.battery_heater_no_power, NULL AS est_battery_range_km, c.rated_battery_range_km, c.usable_battery_level, c.charge_energy_added, c.charger_actual_current, c.charger_phases, c.charger_pilot_current, c.charger_power, c.charger_voltage, c.fast_charger_present, c.conn_charge_cable, c.fast_charger_brand, c.fast_charger_type, c.not_enough_power_to_heat FROM charges c INNER JOIN charging_processes ON charging_processes.id = c.charging_process_id INNER JOIN cars ON cars.id = charging_processes.car_id INNER JOIN positions ON positions.id = charging_processes.position_id WHERE c.usable_battery_level IS NOT NULL) TO 'teslamate.csv' csv header" && docker-compose exec -T database cat teslamate.csv > teslamate.csv && gzip teslamate.csv

This will generate and compress an export at  teslamate.csv.gz.

Export from a manual non-Docker installation

In a shell, run our magic one-line command, substituting your username and database name:

psql -U YOUR_USER_NAME -d YOUR_DB_NAME -W -c "\copy (SELECT cars.vin, date, latitude, longitude, speed, power, odometer, ideal_battery_range_km, battery_level, outside_temp, elevation, fan_status, driver_temp_setting, passenger_temp_setting, is_climate_on, is_rear_defroster_on, is_front_defroster_on, inside_temp, battery_heater, battery_heater_on, battery_heater_no_power, est_battery_range_km, rated_battery_range_km, usable_battery_level, NULL AS charge_energy_added, NULL AS charger_actual_current, NULL AS charger_phases, NULL AS charger_pilot_current, NULL AS charger_power, NULL AS charger_voltage, NULL AS fast_charger_present, NULL AS conn_charge_cable, NULL AS fast_charger_brand, NULL AS fast_charger_type, NULL AS not_enough_power_to_heat FROM positions INNER JOIN cars ON cars.id = positions.car_id WHERE usable_battery_level IS NOT NULL UNION SELECT cars.vin, c.date, positions.latitude, positions.longitude, NULL AS speed, NULL AS power, NULL AS odometer, c.ideal_battery_range_km, c.battery_level, c.outside_temp, NULL AS elevation, NULL AS fan_status, NULL AS driver_temp_setting, NULL AS passenger_temp_setting, NULL AS is_climate_on, NULL AS is_rear_defroster_on, NULL AS is_front_defroster_on, NULL AS inside_temp, c.battery_heater, c.battery_heater_on, c.battery_heater_no_power, NULL AS est_battery_range_km, c.rated_battery_range_km, c.usable_battery_level, c.charge_energy_added, c.charger_actual_current, c.charger_phases, c.charger_pilot_current, c.charger_power, c.charger_voltage, c.fast_charger_present, c.conn_charge_cable, c.fast_charger_brand, c.fast_charger_type, c.not_enough_power_to_heat FROM charges c INNER JOIN charging_processes ON charging_processes.id = c.charging_process_id INNER JOIN cars ON cars.id = charging_processes.car_id INNER JOIN positions ON positions.id = charging_processes.position_id WHERE c.usable_battery_level IS NOT NULL) TO 'teslamate.csv' csv header" && gzip teslamate.csv

This will generate and compress an export at  teslamate.csv.gz.

Export from an Unraid installation

In the Unraid web interface, go to Docker and select the postgresql container.

Select Console and run our magic one-line command, substituting your username and database name:

psql -U YOUR_USER_NAME -d YOUR_DB_NAME -W -c "\copy (SELECT cars.vin, date, latitude, longitude, speed, power, odometer, ideal_battery_range_km, battery_level, outside_temp, elevation, fan_status, driver_temp_setting, passenger_temp_setting, is_climate_on, is_rear_defroster_on, is_front_defroster_on, inside_temp, battery_heater, battery_heater_on, battery_heater_no_power, est_battery_range_km, rated_battery_range_km, usable_battery_level, NULL AS charge_energy_added, NULL AS charger_actual_current, NULL AS charger_phases, NULL AS charger_pilot_current, NULL AS charger_power, NULL AS charger_voltage, NULL AS fast_charger_present, NULL AS conn_charge_cable, NULL AS fast_charger_brand, NULL AS fast_charger_type, NULL AS not_enough_power_to_heat FROM positions INNER JOIN cars ON cars.id = positions.car_id WHERE usable_battery_level IS NOT NULL UNION SELECT cars.vin, c.date, positions.latitude, positions.longitude, NULL AS speed, NULL AS power, NULL AS odometer, c.ideal_battery_range_km, c.battery_level, c.outside_temp, NULL AS elevation, NULL AS fan_status, NULL AS driver_temp_setting, NULL AS passenger_temp_setting, NULL AS is_climate_on, NULL AS is_rear_defroster_on, NULL AS is_front_defroster_on, NULL AS inside_temp, c.battery_heater, c.battery_heater_on, c.battery_heater_no_power, NULL AS est_battery_range_km, c.rated_battery_range_km, c.usable_battery_level, c.charge_energy_added, c.charger_actual_current, c.charger_phases, c.charger_pilot_current, c.charger_power, c.charger_voltage, c.fast_charger_present, c.conn_charge_cable, c.fast_charger_brand, c.fast_charger_type, c.not_enough_power_to_heat FROM charges c INNER JOIN charging_processes ON charging_processes.id = c.charging_process_id INNER JOIN cars ON cars.id = charging_processes.car_id INNER JOIN positions ON positions.id = charging_processes.position_id WHERE c.usable_battery_level IS NOT NULL) TO 'teslamate.csv' csv header" && gzip teslamate.csv

This will generate and compress an export at  teslamate.csv.gz.

Import into Tessie

Go to Import from TeslaMate, click Import TeslaMate Export and select teslamate.csv.gz.

That's it! Tessie will automatically process all of your data.

You'll receive an email when it's done.

This process is very data intensive and Tessie is extremely detailed in processing it.

Depending on the length of your vehicle history, this process may take several hours. Be assured that Tessie is working hard to import it!

Need more help? Contact us at support@tessie.com support@tessie.com