dev

Movescount Backup – A Library For Full Backup of Moves From Suunto Movescount

Overview

Movescount Backup is s simple library that can download move records from Suunto Movescount. I created is just because there is no official way how to create a backup of all your moves and a optional possibility yo migrate them to other service such as Garmin or Strava.

With this library you can periodically call it and download all data about move that is available on Movescount – description, details, GPS data, media files, etc. Next you can you these downloaded data and upload them to other services. In my case I’m using these data to update activities on Strava. Because move -> activity synchronization between these services does not copy all data. And manual update is boring and time consuming.

Library Description

The library is written in .NetCore (.Net Standard 2.0). The code is available  GitHub and you can find it in NuGet too.

PM > Install-Package MovescountBackup

 

It consists of the following projects:

MovescountBackup.Lib

The main project with the following important classes.

Client.cs

Client is the class responsible for downloading data from Movescount. Because there is only need to get list of moves and one particular move with details, there are no other calls, such as crate new move, update move, etc. But, it can be extended to a full Movescount API client. The only problem is that the API spec is not public, so some inspection is required (e.g., searching on GitHub).

Downloader.cs

A class that uses Client to download single or multiple moves and store them to local disk (FileSystemStorage) or Azure Blob Store (CloudStorage). A sample Downloader usage can be found on GitHub.

Requirements

To be able to connect to Movescount API, you have to have following keys that are required to be able to get data:

  • MovescountAppKey – App key to be able to query Movescount API.
  • MovescountUserKey – User key to be able to query Movescount API.
  • MovescountUserEmail – User email to be able to query Movescount API.
  • MovescountMemberName – Name of the member whose data we want to get.
  • CookieValue – A cookie value that is needed to export GPX, TCX and other move files. This value can be get by the following steps:
    1. Open console in your browser to se network requests.
    2. Login into Movescount.
    3. Select a request to http://www.movescount.com/api/members/private/messages.
    4. Copy value of Cookie key in request header. It should start with ASP.NET ….

Deployment

You can use this lib to be run manually (MovescountBackup.Console.Program.cs) or you can create, e.g., a Azure function Lambda function on AWS, that can run periodically, as described in overview. As mentioned before, it is available in NuGet.

Contributing

Contributing is welcomed. The Client implements just two calls to Movescount API because it is enough for the backup. But implementation of the full API can be useful in other cases. So if you want such ability, feel free to extend the Client class.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s