Never ending service and server saga

Time flies. It has been close to one year since Garmin opened its new API to third party developers and that I embarked on migrating ConnectStats to using it. I had anticipated it would be fairly straight forward, but, boy, it has been quite a ride, and the last few weeks continued to provide a lot of “excitement”. Let me share some of that story…

Quick recap of the service

In the past ConnectStats was connecting to the Garmin Connect website to extract the data for the user activities. While this was the way ConnectStats worked from the beginning (2011!!!), it was simple as I didn’t have to maintain any online servers, but it was not very robust and repeatedly created serious outage as the Garmin Connect website would change its way of getting data without any type of support or documentation. I would typically have to find out via a multitude of bug report and try to reverse engineer what had changed on the web site.

The new service is fully documented and supported, but the flip side is that it works by pushing the fit files of a user to the application web server in the cloud. Which means you need to have a web server in the cloud, which I didn’t…

Continue reading

Data Privacy in ConnectStats

I recently saw a negative review on the App Store for ConnectStats warning users that ConnectStats is not a Garmin app and therefore people should avoid giving away login information in the app as the data may get stolen.

Keeping data secure both on your phone or online has been a key guiding principle in how I tried to implement the app. So while I understand the concern, I felt it was a bit unfair.

I have been careful to make sure the data isn’t shared and the passwords are never sent to me. I also made the app open source so that people can check for themselves what it is doing.

I felt it may be worth to write a bit of details on what is ConnectStats doing with your data and password, with link to the code. So people can either let me know if I miss something or feel better about using the app.

Continue reading

ConnectStats Winter Sports Edition

I spent over a week in the Swiss alps, so it was clearly the time to update ConnectStats with better support for winter sports…

Garmin had made some changes to their API for winter sports, and reorganised a bit the types of activities available. I have a Fenix 6 and it has a nice new activity for backcountry skiing with climbing mode (at least I wasn’t aware before). So I updated ConnectStats to properly recognise it and added a new icon for it. I also made sure it display the elevation gain in the summary as this is more relevant for these type of activities.

Continue reading

A few app updates

I have a few upgrades of the app about to be released (pending Apple approval). I have pushed minor updates of ConnectStats, a new version of FitFileExplorer

Few bugs out of the way

The version 5.2.2 will contain a few bugs fixes that people have been reported recently.

First it should synchronise better the changes that occurs on the Garmin Connect Website, specifically the names of the activities.

Continue reading

Learning from Services Woes

So in the last few weeks, ConnectStats had a lot of issues related to online services. That was quite a learning experience. I hope most of it is behind, but could be a few left overs.

Strava

Strava made a change in its API related to how it authenticate users for access. This was a documented and announced changed, unlike a lot of the Garmin API changes in the past,. The issue is mostly that I hadn’t understood the change, so I didn’t get the right fix out in time. So I have only myself to blame…

Continue reading

Getting the weather for an activity in ConnectStats

As of version 5.1 you can obtain weather information for Connectstats activities if you use the new service I implemented using Garmin Health API and DarkSky. But in order to access it there are a few things to know and do.

The weather will only be added to new activities, once you have started using the new service, which is not currently the default in the app.

To enable the new service, you should go to your config page in Service and accounts and change the Source for the Garmin information to be All as below.

Continue reading

New services and Withings working again

Finally I got withings and the new service for ConnectStats to work again with version 5.1! At the time of this writing version 5.1 is pending apple approval for release.

Withings

The Withings authentication process has been broken for a while…

It took me trying a whole new approach to do the authentification process for the withings API, a few exchanges with withings support and learning way more than I ever wanted to know about the OAuth 2.0 protocol to get it all in the right place again.

Continue reading

New Service not working well

A few days after releasing my new version that uses the new Garmin Health API and my own server, it’s not really a success story… My server is overwhelmed by the synchronisation and backfill requests…

I had initially planned to turn on the new service only for new users to avoid stressing the server too much, but still it does. So I have issued a new version that only doesn’t enable the new service by default.

For those who have issues with the service, just switch the Source in the settings for Garmin to be Garmin Website

I am going to do two things, try to optimise the way the server processes backfill, and add a way for ConnectStats to download the history from the website, and only process new activities from the new service. I hope it’s just that I did something silly in my implementation (very likely) and not that I will need to upgrade to a bigger infrastructure…

I feel bad for the new users of the app this weekend as this is not a great first experience of the app, but hopefully, soon it will be in a better place..

Dark Mode and New Service

I just pushed version 5.0 of ConnectStats to Apple for review. It will likely take a few days for the version to be approved. Hopefully it will be done in time for the iOS 13 release.

This version has two major changes. First the app has been updated with a new look for iOS 13 and support for dark mode. Second it can now use the new service I have been testing with a few users. Before you switch, please read the details below to make sure it’s for you.

Dark Mode

Version 5.0 has a major revamp of the way the interface is driven internally to enable much more customisation of the look of the app. This was driven first to be able to support the new dark mode from iOS13, but it may later help support more customisations.

In the settings you can now choose a theme. You’ll find a few so far:

  • Original: it just make the app look like it has been in the last 8 years…
  • Dark Mode: it is a mode that changes the look to a dark mode on iOS 12
  • Dynamic: it is a mode that changes between the above two on iOS 13 depending on the general mode of the app (light or dark)
  • Native iOS 13: This is a mode only available on iOS 13 that uses the standard colors of iOS 13. The main difference being in dark mode and some minor changes in the light mode. This is probably my preferred one so far, and when the app runs for the first time on iOS 13 it will change to this mode (after iOS update)

You can see a few previews of the iOS 13 dark mode here. If you find any issues with it, send a bug report or comment here.

New Service

I have been implementing a new service in the last few months using the new Health API from Garmin. The main benefit is that it is supported by garmin, as opposed to the current way ConnectStats access your activities by using the unsupported API that the garmin connect website uses. It will present a few benefit now or later:

  • we should not have unexpected failure of the app like this one or this one. This service is fully supported by Garmin
  • It give more control on the data exchange and provide the ability to implement new features like adding weather information (will come soon after this release) or notification (maybe, if it’s deemed useful)

The flip side is that currently it has a few shortcomings, so I do not recommend that everyone switches to it just yet, unless you understand the below issues:

  • The initial synchronisation of the account can be slow : about 2 min for every 2 months of activities you want to synchronise. There is nothing I can do about that, it is a limitation of the API.
  • Details of older activities that were recorded on an older device no longer associated with your garmin account will not be available. So only a summary but now maps or details graph. Garmin told me they are working on fixing this issue.
  • Extra information you have on the Garmin Connect Website, for example activity names, or edited activity type after the initial upload will not be seen by the new service.
  • It’s a new service I implemented myself, so it is possible, instead of unexpected failure because of a garmin change, it will could have some issues initially because of my own mistakes… But I’ll do my best to fix.

In light of the above limitations, I currently set up the app to only use the new service for brand new users. Existing users will continue on the old API and would have to switch manually to the new service in the settings and as in the below screen, switch the source to ConnectStats.

The new service is implemented such that will will understand the equivalence with activities downloaded from garmin connect. So you can switch back and forth between the two services and it should work and not be confused. You can also create a new profile to test it out.

I intend to implement soon a new version that will allow to more seamlessly get the data from the two services, which will be a bit of the best of both world…

Note that I encourage you to read the privacy policy to make sure you understand what happens to your data. The key point being, the new service does not keep any information whatsoever about who you are. At no point do I save your name, email, etc (the service actually never asks for it and never obtains it), but the service will save your fit files.

You can read a bit more about the new service here.