New Garmin Service Integration

Garmin recently announced a new Health API for third party developer. Given the issues I have been having extracting activities from the web service with regular changes to the API breaking the app, I jumped on the opportunity to try to have a more robust integration.

The new service does not let you access the activities from your account directly as ConnectStats has been doing via the web site API, instead it is a mechanism to provide the activities into your own service. Which meant that to use it, I would have to host on a server my own service that receives the data, stores it and make it available to the app.

The service is now integrated, and I will have to start rolling it out. I will initially roll it out via Test Flight and ask volunteer to do some testing to make sure the service works. It is quite scary as I could only test it with my set of activities and my Garmin account.

Principles of the integration

It is possible either to start a new profile where all the activities are downloaded from this new service or to only start downloading from this service new activities when you have older activities already downloaded from Garmin. It should handle past duplicate properly.

The data will be synchronised into a database online, but the app will not ask you any identification via email or others. All the data will be referenced via hashed keys linked to Garmin account, and I intend to prevent any access to your data if you didn’t successfully login to the Garmin service. Any way around this is a bug, and I will fix them as they are reported. The web service is also open source so for transparency people can verify I don’t do anything bad or point the bugs out.

There are a couple of short comings from the new service to understand.

History requires slow first synchronisation

When you first enable the service, it will contain no history of your activities. Upon first login, it will trigger a synchronisation of your previous activities with Garmin which is time consuming. It happens at a rate of 90 days per two minutes. So synchronising one year of activities it will takes about 8 minutes.

Also because it is impossible for the app to know how many years to ask in the past, when you setup the account, you’ll need to specify from which year you want to synchronise your activities, which will default from the previous year. If you select many years you’ll need to wait a about 8 minutes per year until the synchronisation is finished.

This is a rate limitation imposed intentionally by the Garmin service, so there is nothing I can do about it.

Only details for activities from the devices currently associated with your account

Currently the service will only provide details (from fit files) for activities that were recorded with a device that is currently associated with your Garmin account. So if you changed devices and unregistered the old device, you will no longer be able to download the detailed fit file and only have access to a summary of the activity.

This is an unintentional issue with the Garmin service, and Garmin support told me they will work on removing the limitation. I’ll update the post when the limitation is removed.

Testing volunteers

I will need some volunteer to test the service. I can’t release widely after just testing on my account. It is likely that there will be some issues initially, but it should be easy to maintain two profiles in the app: one from the current Garmin service and one from the new one for testing. It is also intended to let you switch back an forth between services, if you delete some activities from the app and trigger a synchronisation from the other services, only the missing activities should come from the previous service.

The activities on the Garmin Connect service will NEVER be touched or deleted by anything you do on the ConnectStats app.

You’ll find instruction to test the new build here

4 thoughts on “New Garmin Service Integration

  1. Given I’ve enjoyed this website for 4plus years and hope to for longer I’m ok testing. I’ve got some multi sport and swim activities as well as some no longer connected devices. Will try to follow the instructions this week

    • Great thanks for trying. You only need to use test Garmin via connectstats. Technically you could merge both, but for testing better to only use the new one. Also I recommend using a new profile (in Settings), so you don’t loose the activities you currently have in case of problem. It should let you switch easily back and forth.

Leave a Reply to BriceCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.