How to upload TCX file from Polar Flow to Garmin Connect

a little bit of complain and solutions

Introduction

I used a Garmin 310XT since 2015 and it works very well until now. However I would like to measure some data from my sleep time. Thus I was wondering to buy a new watch.

My first idea was a Garmin, but the prices in Brazil were a little bit bitter that moment. I made a research and found out some Polar models, and after all I bought a Polar M2. The main reason was the price, if compared with a Garmin 245.

After I read the manual, I installed the app in the mobile, synchronized, and made an update. All working well! Thus I run two or three times and send all data to Polar Flow (Polar platform). At the first time I did not like, but after few minutes I could say that the platform was quite good. Than I would like to export my activities history from Garmin Connect (Garmin platform), to Polar Flow.

I exported some file from Garmin Connect as TCX format and tried to import in Polar Flow. Than I realized that was impossible to do it! It was very frustrating. I talked with polar support in Brazil and they confirmed. The question at the moment was:

How to keep my history and add new activities at least in one platform?

Well, my solution was to export a TCX file from Polar Flow and upload to Garmin Connect. However at the moment to upload the TCX file in Garmin Connect an error occurred. So, my mission was find out what was the problem and solve it!

Material and Methods

What I used to solve:

  • TCX file from Polar Flow
  • Shell, grep, sed, cat,
  • Emacs
  • Linux (Debian 11)

How to find the problem:

I made a research and found this link: https://forums.garmin.com/apps-software/mobile-apps-web/f/garmin-connect-web/83432/polar-flow-tcx-export-to-garmin-connect. It was the solution.

After open the TCX file from Polar Flow, I compared with a TCX from Garmin Connect. In short terms I found some differences and I made a code to remove it.

Results

The difference between files:

In the TCX file from Polar there were two TAGS used to describe some features in the activity, as follow:

egrep -E '<Name>.*<\/Name>' 2022-09-27_05-34-23.TCX 

...
<Name>Polar Flow Mobile Viewer Android</Name>
...

And:

 egrep -E '<Auth.*</Author>' 2022-09-27_05-34-23.TCX 

...
<Author xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Application_t"><Name>Polar Flow Mobile Viewer Android</Name><Build><Version><VersionMajor>0</VersionMajor><VersionMinor>0</VersionMinor></Version></Build><LangID>EN</LangID><PartNumber>XXX-XXXXX-XX</PartNumber></Author>

I removed this tags from TCX the file and all works.

If you wanna to see all the code, it is available at my GitHub . To know how to use: https://github.com/rafatieppo/shell_script#tcx_polar_to_garminsh

Conclusions

  • A shell script was developed to prepare TCX file from Polar Flow to Garmin Connect.
  • The polar M2 model is good, I really liked. However it was my first and last Polar product. The reason is the Polar flow (do not import TCX files).
  • I understand that Garmin has more respect for your customers, because allows the customer to import files from other devices in Garmin Connect.

References

 Share!

 
comments powered by Disqus