Sync Wahoo SYSTM calendar with intervals.icu

You can use the “Clear week” option to delete a week at a time:

Or delete all future planned workouts at once:

2 Likes

I seemed to have sorted it by adding utf-8 encoding to the read and write of the zwo file so the 2 lines look like this:

            f = open(filename_zwo, "w", encoding='utf-8')

            zwo_file = open(filename_zwo, 'r', encoding='utf-8')

It fixed it for me and hope the above is of use to others.
It still fails on the race day event (final day of programme) but that’s fine.

Thanks very much for the great script!

1 Like

Hey, is it possible to set a default time for the workout to be added?
Right now there is no time in the workout details:

When using the export calender feature (intervals.icu) it could be helpful, when the workout will be shown at a fixed time at day instead of all day. I guess most people do their sessions more or less at the same time of the day.

That timing was added for sorting order in the calendar as some users were having multiple workouts in a day and wished to have the order the same as their workout timing.

Which timing was added? There is no timing except the “all day” timing.

The one you placed in a Red Box. That was newly added to indicate when the workout should start at.

Work’s kept me busier than expected so apologies for the delay in responding here.

  • @oschmidt, I’d have to check the API calls involved but that might be possible as an optional item in the configuration. However if one has multiple activities planned on a day, they will all be scheduled at the same time which is perhaps what @app4g is referring to.
  • @Vilbs, thanks for that - I’ll do some testing and might force UTF-8 encoding in future versions to avoid this from happening.
3 Likes

This is so cool, thanks for taking the time to create it. Ran it from the iSH app on my iPad, worked perfectly. :pray:

1 Like

Hi,
Can you tell me which app is it? I am interested in running this on my ipad instead of my mac.
Cheers,
r.

Sure, here you go:
iSH Shell on the App Store (apple.com)

After installing the app, run a few commands to get suffersync working:

apk upgrade
apk add python3
apk add --update py-pip
pip install suffersync

Then as per the getting started notes just edit the suffersync.cfg file and add your intervals.icu athlete id & api key, and your Wahoo username & password, and you should be good to go.

2 Likes

Hi ,
i have another question . As these endpoints are not openly exposed by Wahoo and Documented in the Api Documentation . Is this not against copyright to draw Workout data from these sources ? Dont get me wrong , its great to be able to sync Systm with Intervals , but it could be a problem , no ?

Unfortunately, I got a similar error message:

Blockquote
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/suffersync.py”, line 458, in
main()
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/suffersync.py”, line 282, in main
start_date_local = datetime.strptime(start_date_local, “%Y-%m-%dT00:00:00”).date()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/_strptime.py”, line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/_strptime.py”, line 349, in _strptime
raise ValueError(“time data %r does not match format %r” %
ValueError: time data ‘2023-03-06T08:00:00’ does not match format ‘%Y-%m-%dT00:00:00’

I’ve also scheduled some workouts manually, but want to sync SYSTM workouts in addition. Why is it conflicting?

Just glancing at this it looks like this is the issue, should be %Y-%m-%dT%H:%M:%S to allow the 8 through

2 Likes

Awesome :+1:. I’ve check the source code and adjusted accordingly. Would by good to update in the source code as well.

1 Like

I have been unable to have this script upload future workouts. No error messages output. Everything seems to run without issue, but no planned workouts are created on intervals. I was able to get it to upload a past workout, but no future cycling workouts seem to sync. Any insight?

I’ve finally had some time to work on this again, someone was kind enough to create a pull request for the datetime issue so it’s been updated now in the latest version.

I also made a minor change to replace the word ‘km’ in a description, as intervals.icu takes the preceding number as the total distance for a workout which is incorrect.

Just checking that you’ve adjusted the dates correctly in the suffersync.cfg file to reflect the correct dates? The previous version would have the default set to get everything till December 31, 2022. I’ve now updated it to December 31, 2023 but it’s recommended to change the dates according to your needs to avoid potential duplicates.

Hi @Bakermat
is this tool still supported?

After the “summer break”, I tried to run it but I’ve got this error.

is this a user error or something needed to be updated?
I’ve tried to re-install it but still got this message

Something went wrong: 500 Server Error:  for url: https://intervals.icu/api/v1/athlete/*my_athlete_id*/events

thanks!

Also getting some errors with this script now, last ran successfully October 2023. After the xmas break came back to import my new year workouts and getting:

Something went wrong: 422 Client Error: for url: https://intervals.icu/api/v1/athlete/[*REDACTED*]/events

Have jumped into the zwo folder and tried to manually upload zwo file and got the following error: “2024-02-02_UCI_Centre_2_Tour.zwo: FIT decode error: Endian 61 not supported. Error at byte: 17”

Quick check of the file shows a new line at the top, removing this allowed me to import the file (but could be because notepad re-encoded on saving?). Modified the suffersync.py script to remove the new line at the top but still getting Client error 422.

Just seen the pull request on the official github - GitHub - bakermat/suffersync: Syncs Wahoo SYSTM calendar with intervals.icu , it’s a simple fix todo with encoding: fix: intervals.icu expects application/json Content-Type by arthuracs · Pull Request #15 · bakermat/suffersync · GitHub

1 Like

I just hit the issue myself as well and resolved it before seeing your issue. The <?xml line on top needs to be removed and encoding indeed changed to application/json.

Expect a new version soon, I’m also fixing an issue with workout names that have special characters in them that I’ll include.