simonepri / fitbit2garmin

⬇ Downloads lifetime Fitbit data and exports it into the format supported by Garmin Connect data importer. This includes historical body composition data (weight, BMI, and fat percentage), activity data (calories burned, steps, distance, active minutes, and floors climbed), and individual GPS exercises (TCX).
MIT License
43 stars 2 forks source link

Exported exercises fail to import to Garmin #7

Open delize opened 5 months ago

delize commented 5 months ago

When running the tool to export exercise files to upload into Garmin, I end up receiving the following error:

INFO:root:[40/3500] Fetching activity 100584823.
INFO:root:[40/3500] Activity 100584823 has an empty tcx.
INFO:root:[41/3500] Fetching activity 100573180.
INFO:root:[41/3500] Activity 100573180 has an empty tcx.
INFO:root:[42/3500] Fetching activity 163403442.
INFO:root:[42/3500] Activity 163403442 fetched.
INFO:root:[43/3500] Fetching activity 163403443.
INFO:root:[43/3500] Activity 163403443 fetched.
INFO:root:[44/3500] Fetching activity 188763110.
INFO:root:[44/3500] Activity 188763110 has an empty tcx.
INFO:root:[45/3500] Fetching activity 188782998.
INFO:root:[45/3500] Activity 188782998 has an empty tcx.
INFO:root:[46/3500] Fetching activity 188787306.
Screenshot 2024-03-23 at 6 50 08 PM

These files look like...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TrainingCenterDatabase xmlns="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2">
    <Activities>
        <Activity Sport="Running">
            <Id>2015-04-05T17:18:58.000+02:00</Id>
            <Lap StartTime="2015-04-05T17:18:58.000+02:00">
                <TotalTimeSeconds>3107.0</TotalTimeSeconds>
                <DistanceMeters>2356.2000000000003</DistanceMeters>
                <Calories>447</Calories>
                <Intensity>Active</Intensity>
                <TriggerMethod>Manual</TriggerMethod>
                <Track>
                    <Trackpoint>
                        <Time>2015-04-05T17:18:58.000+02:00</Time>
                        <Position>
                            <LatitudeDegrees>56.94070560564697</LatitudeDegrees>
                            <LongitudeDegrees>14.7946358862628</LongitudeDegrees>
                        </Position>
                        <AltitudeMeters>145.3</AltitudeMeters>
                        <DistanceMeters>0.0</DistanceMeters>
                        <HeartRateBpm>
                            <Value>75</Value>
                        </HeartRateBpm>
                    </Trackpoint>
                    <Trackpoint>
                        <Time>2015-04-05T17:18:59.000+02:00</Time>
                        <Position>
                            <LatitudeDegrees>56.940704650215814</LatitudeDegrees>
                            <LongitudeDegrees>14.794636537064802</LongitudeDegrees>
                        </Position>
                        <AltitudeMeters>145.3</AltitudeMeters>
                        <DistanceMeters>0.0</DistanceMeters>
                        <HeartRateBpm>
                            <Value>75</Value>
                        </HeartRateBpm>
                    </Trackpoint>
                    <Trackpoint>
                        <Time>2015-04-05T17:19:00.000+02:00</Time>
                        <Position>
                            <LatitudeDegrees>56.94070445036153</LatitudeDegrees>
                            <LongitudeDegrees>14.794638357985828</LongitudeDegrees>
                        </Position>
                        <AltitudeMeters>145.3</AltitudeMeters>
                        <DistanceMeters>0.0</DistanceMeters>
                        <HeartRateBpm>
                            <Value>75</Value>
                        </HeartRateBpm>
                    </Trackpoint>
...
                </Track>
            </Lap>
            <Creator xsi:type="Device_t" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <Name>Fitbit Surge</Name>
                <UnitId>0</UnitId>
                <ProductID>0</ProductID>
            </Creator>
        </Activity>
    </Activities>
</TrainingCenterDatabase>

EDIT:

The largest file downloaded so far - has <5000 track points and is 3 MB:

So neither of these requirements are being reached: https://support.garmin.com/en-US/?faq=Ht3ZP52Kju075uKvqTqu99

delize commented 5 months ago

If I run the TCX files through: https://gotoes.org/strava/Combine_GPX_TCX_FIT_Files.php Then upload them to Garmin they work fine.

delize commented 5 months ago
Screenshot 2024-03-24 at 8 49 53 PM

It seems like both the time, and GPS Coordinates are being altered. That seems to be the reoccurring thing.

keith555 commented 5 months ago

I'm getting the same thing. It was working 6 weeks ago. I'm getting the same error if I download the file directly from FitBit. Looks like Garmin have changed something in their import.