[solved] TCX files - Missing Heartrate

Sorry if this is the wrong place to post, but I am having problems with TCX files. I cannot get Heartrate data to show up. It does not work on Intervals or Strava.

My gym is using TechnoGym which has a very bad integration with the rest of the fitnessworld. I found and adjusted a script online that was able to convert the JSON data they use to populate their own website into a .TCX file.

I now have issues getting the heart rate included.

I tried to add heartrate in this way:
(Track : Trackpoint : HeartRateBpm : Value), as I found fitbit to use this link

I also tried “hr” “HeartRate” etc, but i had no luck
.
This is a snapshot of the .tcx file i have now:


<?xml version='1.0' encoding='ascii'?>
<TrainingCenterDatabase xmlns="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2">
    <Activities>
        <Activity Sport="Biking">
            <Id>2023-10-11T21:30:00Z</Id>
            <Lap StartTime="2023-10-11T21:30:00Z">
                <Track>
                    <Trackpoint>
                        <Time>2023-10-11T21:30:01Z</Time>
                        <Extensions>
                            <TPX xmlns="http://www.garmin.com/xmlschemas/ActivityExtension/v2">
                                <Watts>37</Watts>
                            </TPX>
                        </Extensions>
                        <Cadence>72</Cadence>
                        <HeartRateBpm>106</HeartRateBpm>
                    </Trackpoint>

Would anyone have an idea how to add the Heartrate data?

Once I get this working I will also publish the script. Now with it raining a lot more its a nice way of getting some indoor workouts done.

Edit
Other data is correctly processed:

1 Like

When looking at the data of this post it seems that I am missing an actual field called “Value”.

you are correct
the HRBPM is the outer enclosing tag

 <HeartRateBpm>
         <Value>106</Value>
</HeartRateBpm>
1 Like

I got it working with:

                  <Trackpoint>
                        <Time>2023-10-11T21:30:01Z</Time>
                        <Cadence>72</Cadence>
                        <Extensions>
                            <TPX xmlns="http://www.garmin.com/xmlschemas/ActivityExtension/v2">
                                <Watts>37</Watts>
                            </TPX>
                        </Extensions>
                        <HeartRateBpm>
                            <Value>106</Value>
                        </HeartRateBpm>
                    </Trackpoint>
   

Always nice to spend the whole evening trying everything, then when ask the question online you find the answer yourself within 10 minutes :slight_smile:

1 Like

That’s usually my experience as well…

1 Like

hmmm, I wonder how I can use this, I have a fitbit and when I record a spinning session, all I record is HR but i cant get that data into intervals…any options i can try?

Ive tried exporting the tcx from fitbit, the json from google takeout, nothing imports into intervals

I just converted some data to the TCX format and uploaded it to intervals via the “Upload” button, so .TCX should definitely work.

Maybe try to open the .tcx file and see if it looks anything like the snippet in my original post?

please share the TCX file. or snippets of it.
Of interest would be the spinnet like what @martijn shared as well as the headers at the beginning of the file…

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TrainingCenterDatabase xmlns="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2">
    <Activities>
        <Activity Sport="Other">
            <Id>2023-10-03T22:31:09.000+02:00</Id>
            <Creator xsi:type="Device_t" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <Name>Fitbit Versa</Name>
                <UnitId>0</UnitId>
                <ProductID>0</ProductID>
            </Creator>
        </Activity>
    </Activities>
</TrainingCenterDatabase>

Nope, it looks nothing like the code Martijn shared…Im stumped as to where the HR data is stored then when I download the TCX and it contains nothing

After a quick google search I see there is an issue with fitbit that when you export a workout without GPS data it will just be empty like you have here:

https://community.fitbit.com/t5/Surge/TCX-files-are-empty-when-i-export-them/td-p/2744187

The solution posted is that you need to connect fitbit with fittostrava which will export the data to strava and then export it from there (or connect Intervals with strava)

They do have an api so you could maybe make a feature request for intervals to directly connect to fitbit and download the info from there.

1 Like

Im gonna give this a shot thank you!

1 Like

This literally worked instantly…thank you thank you thank you

4 Likes

Hi Martijn, can I ask you where did you find a online script to convert the JSON data into a TCX file ?
I’m brand new with Technogym, Its such a pain in the *** to get back de workout data from Mywellness

Thanks in advance

Hi,

I found a script that did something similar and modified it.

It was a kind of a botch, I ran it once then didnt use it anymore.

Best thing would be to connect technogym to strava, back when i made the post this didn’t work, but now it seems to do.