Intervals.icu now supports download of activities and wellness data from Polar via their API. Just tick the boxes in /settings and authorise Intervals.icu:
Only new activities are downloaded. This is a limitation of the Polar API. I did investigate implementing “Import all data” like Garmin using the file they send you when you ask for your data. Unfortunately you can’t re-create what you would get from the API using the data they send you. Altitude is missing and speed is very different. So I have parked that for now.
Click the list of wellness items to choose which ones you want to get from Polar. Resting HR is taken from average sleeping HR. Sleep time is time in bed less interruptions and awake time. Sleep score is the Polar sleep score.
Sleep quality is derived from sleep score: 85+ = Great(1), 70+ = Good(2), 60+ = Average(3), below 60 = Poor(4).
The “Download Old Data” button downloads old wellness data. It takes a while so please be patient.
I hold hope that polar will implement a less restrictive api in the future. The data available on the website seems easy to access and presented in json though via account credentials, though not useful for most people or normal app integration.
I downloaded my polar data and in the training session json file, longitude, latitude & time were available. Wouldn’t that be enough to create a gpx? An example of the data:
I actually did write code to generate .fit files from the json data (not from the website but from the “all my data” dump). With my test workout recorded using the Polar app on my phone the altitude trace was missing and the speed trace was very different.
I could use Intervals.icu elevation correction to get altitude and use the speed “as is” but whatever I produce will not be the same as what you might see in Polar Flow.
From Polar via the API (correct I was walking and did stop a few times to look at app):
I compared an activity from the following sources, JSON data dump, Polar Flow TCX export and Strava Original File TCX export.
The Polar Flow export and Strava Original export matched exactly. (Strava was in pretty print though, and I got an error when trying to upload it to Intervals: “* Request failed with status code 422”. The Polar Flow file would upload).
The following values were available in the TCX files and appeared to match exactly to the JSON file.
This brings to a request for having the possibility to merge data of the same workout but coming from different devices and platforms. I pool swim with a Garmin (i.e. no HR recorded unless with the special HR band) and I record the HR with a Polar Verity OH.
This results in two different activities that I would like to merge into one. I know that Golden Cheetah does that.
It might be useful also in case of indoor bike training when comparing power from the trainer vs power from meter.
I’m extremely surprised Polar provides any API at all For years RunGap was the only option (also it didn’t work).
Wellness data export is very nice — I grew bored a couple of months ago filling everything in, but my watch continued to gather the data. However, I notice that the import of historical data has left some blanks in HRV:
Tx. Could you please redo the historical import. I have added some logging so I can see which days had data and so on. If the import is missing data I need to sort that out.
Educated guesses: looks like there is a check that can skip data download for certain dates. Then resync is impossible if the import failed for some days
I can see some “random” failures in the logs so I have added retry logic. Will have to see if that is enough. I have also added a green “Busy please be patient” banner when you click ok. It takes a long time to get the data.
I have added support for importing your complete Polar history. Unfortunately the file formats and so on are undocumented so I need some more examples to know it is working. In particular if you are using a Polar device to record power from a power meter or running power please give this a try and send me a message. You can untick the “Import activity files” box so it won’t change anything on Intervals.icu.
Hello @david and other.
I think I have found a bug.
I have synchronized intervals with strava and polar.
today when I have synchronized my polar, I had problems (polar fault), and I had to synchronize 2 times. Activity has been uploaded twice to intervals.icu (Strava + polar).
My theory is that in the first time the activity has been uploaded to polar and it has been synchronized with intervals.icu, and the second time I synchronized, it has synchronized with strava and has been synchronized again with intervals.icu.
One thing I noticed is that the resting HR data I added myself wasn’t overwritten when clicking on “Import old data”. To ensure consistency I deleted my manually added data but even when clicking on “Import old data” then it didn’t add any HR data for the now-empty dates.
No issue with the sleep data, that was added for all dates fine - it’s just the resting + avg sleeping HR (which I know is the same in Polar’s case) that didn’t come through properly for the dates where manual data existed.
I got around it by getting the data from the Polar API and then pushing it to the intervals.icu API myself using PUT but this might affect others as well that relied on manual data before the Polar integration was done.
Imported old data only went up to 2 weeks before today because the most recent 2 weeks are covered by normal polling. I was trying to save rate limit. I have changed this so it will fetch until today as rate limit is no longer a problem since lots of people have authed Intervals.icu. Will deploy Tues AM.