End of August, I received a heartbreaking email:
End of September, the TomTom Sports mobile app, Sports website, and Sports Connect desktop application will be discontinued and permanently removed.
I won't be able to leverage my sports watch in a month from now.
Therefore, I got a Garmin watch, but I obviously didn't want to lose my over 800 activities I accumulated over the years. And those weren't transferred to Strava or whatever platform.
I could only download hundreds .gpx and .json_2 files from the TomTom website. And the challenge: importing them back into Garmin, without information loss.
➡️ This project converts TomTom Sports .gpx and .json_2 files into .fit files that Garmin understands and can import.
Used with Python 3.10.
Install dependencies
pip install requirements.txt
(in a virtual environment, or not - as you wish)
Download the tomtom2garmin.py
file
Run the script on your TomTom files
python tomtom2garmin.py tomtomActivities/
Wait for it to generate all .fit
files in output/
Upload them into Garmin Connect
https://connect.garmin.com/modern/import-data
To avoid overloading the UI, I imported 100 files by 100 files.
For now, the script only handles the activities I used to do:
The script ignores tracking files, which are just the daily steps counter from my understanding.
TomTom Sports exports gpx files when GPS data is used for the activity (latitude, longitude, elevation - additionally to the heartrate). But it exports quite custom json_2 files (which are the same as json files) for activities without geolocation.
Issues are that:
The biggest enabler is https://pypi.org/project/fit-tool/ & https://bitbucket.org/stagescycling/python_fit_tool/src/main/ which allows writing FIT files using Python.
FIT specification: https://developer.garmin.com/fit/overview/