-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encountered an unknown sport type? Need your help. #2
Comments
Hello coders, |
For pool swimming (mostly 25m pool, but there could be 50m in there too) I have the following number per activity: Not sure why there's some numbers in the 100s. Hopefully you do. |
@markvanwijhe glad to hear you like Hitrava and thank you for your help. I'm afraid I don't understand the numbers your provided. Are these the sport types you found in the .json files for each single activity? The current program uses 5 = Walk and 3 = Cycle. Or did you find that your swimming activities have once 4, next time 103, next time 102? If you could shed some light on the situation, that would be great. |
@CTHRU sorry I misunderstood the option [--sport Swim_Pool] I thought it would only convert the swimming. It's difficult for me to find the data of just one sport then. The numbers are "sportType" numbers. |
@markvanwijhe No problem. I think you could still help me. I think the numbers you listed above could well be the sport types in the json files. I'm missing the values for swimming and running activity sport types. If I have these, Hitrava can automatically set the correct Strava sport type in the generated TCX file, thus allowing Strava to recognize it and you wouldn't need to change the sport type manually in the Upload Activities screen of Strava. Just to make sure, if you run Hitrava with the --json_export command line argument (e.g. example below):
It will generate both (converted) TCX files for Strava (with a .tcx file extension) and a copy of the (unconverted) JSON data from Huawei for the activity with the same name but with a .json file extension. If you open the JSON file of any swimming or running activity in a text editor(e.g. notepad), you will see something like below:
I would need the number where the question mark is in the line above for pool/open water swimming and running activities (or any other unknown activity for that matter, e.g workout, ...) As an example, a walking activity will look like this:
Whereas a cycling activity will look like this:
Look forward to hear from you. |
I'm also quite happy that this script exists ;). Funnily I discovered the project and this issue just before @markvanwijhe commented. I've just received my GDPR export and run it through the script. My running activities ("Outdoor run" on my GT-2) always come with |
@svenstucki Great, thanks for your help! Your observation is correct. If the sport type from the Huawei data is not known, Hitrava uses a small auto-detection algorithm to distinguish between walk/run/cycle/swim. With your help, Hitrava will be able to auto set the correct sport type in Strava for running and hiking activities (luckily, this was also 1 of the supported types in Strava) in the near future. |
New features and changes - ZIP and JSON conversion: Running and hiking activity types are now directly detected from the Huawei data. - Strava TCX: Hiking activities are generated with the corresponding Strava activity type. You don't need to manually adjust the activity type for hiking activities in Strava after upload. See also #2.
SportType Activity |
Do you still need data for Inline skating? Inline Skating is also supported at Strava. I am unsure if you upload TCX files to Strava that you can change the activity ? Can anyone confirm? |
@PrintTheUniverse - It would be great if you could test conversion for inline skating (and provide me with the activity number). If it wouldn't work out of the box, I will be happy to look at it to get it supported. The TCX upload doesn't support the activity type directly (but I have plans to look into a different way to achieve this in the future). |
Hey, I have an unknown activity type number 2, this is called "Climb" in my watch and "Mountain hike" inside Huawei health app. I see inside the python files, _JSON_SPORT_TYPES already contains hike with number 282, I don't know if it's a mistake or my watch is different. I manually added a new type Btw I'm using a huawei watch gt with software version 1.0.12.8, maybe on other watches hiking has other id? |
@dany123 Thanks for the find. I will add the sport type you found in a future release. |
Rollerskating does not have an option to record GPS. Typical Huawei. On a side note, in the newest huawei health beta there is an option in the device settings page of the app to save GPS files. The beta version is huawei health beta 10.1.1.12 for those who are intrested. |
https://aapks.com/apk/com-huawei-health/ Typical APK site, keep your adblocker on. |
# New features and changes - FILE and TAR conversion: the filenames of the converted TCX files are now more readable (i.e. the same as for the ones generated in ZIP or JSON mode: format _Hitrack_ISO timestamp_sequence.tcx_). If you want to retain the original filename, you can use the new command line argument _--use_original_filename_. Closes #18. - Added 'Mountain Hike' ('Climb') to the list of supported sport types. It will be converted in Strava as 'Hike'. See also #2.
Hello, Huawei Watch GT, apk Huawei Health 11.0.3.512 |
(Edited) Seems that Huawei has open health kit, with a lot of useful information for developers. It does fit with many of the Hitrack files we use to parse the data. I add here the list:
|
@CTHRU I just edited the comment above to change the list to another one I found. I've found that it fits in with some of your types of sports. I guess it will be more useful than the previous one. |
I'm looking for people who have
running,pool swimmingor open water swimming activities in Huawei Health that use the ZIP or JSON conversion.I'm in search of the HiTrack sport type codes for these types of activities in the HiTrack JSON data.
You can provide me with the information as follows:
Thank you for helping out.
The text was updated successfully, but these errors were encountered: