SauceLLC / sauce4strava

Sauce for Strava™
MIT License
200 stars 23 forks source link

Sync weight changes to weight history #74

Open mayfield opened 2 years ago

mayfield commented 2 years ago

Currently once you sync an athlete the weight history becomes static and you have to manage it seperately. Add a dynamic entry type that will follow the strava profile value as it changes.

MrSpock77 commented 2 years ago

Does this apply to FTP also? I have changed my own weight and FTP in the Strava settings, but activities performed after this change still show the initial values. FTP and weight history are not updated automatically.

mayfield commented 2 years ago

You're correct @MrSpock77. I updated the title to reflect this.

mostafamossaad commented 2 years ago

Hello, not sure if this is the right place for this, but here goes. I have my weight syncing from another platform to Strava. Which shows in "My Profile". However, it doesn't seem to be reflected in the Sauce section of "weight" on any of my activities. Is this the issue here? I played around a bit and noticed that if I removed the (tags?) in "Advanced Option" like

"weight_lastknown": "weight_override": "ftp_lastknown": "ftp_override":

Sauce "seems" to bring in whatever values that are in My Profile. And they're in blue, not orange. Also, while we're on the "Advanced Options" window. Who are all those other athletes I see there? I recognize them all, but what brought them in there?

Thank you very much. Keep up the good work.

mayfield commented 2 years ago

Hello, not sure if this is the right place for this, but here goes. I have my weight syncing from another platform to Strava. Which shows in "My Profile". However, it doesn't seem to be reflected in the Sauce section of "weight" on any of my activities. Is this the issue here?

If you're syncing this athlete with Sauce Performance, then this is your issue too. With sync active the weight and FTP values used by sauce are managed separately from the Strava profile settings, as of today. The intent of this enhancement is to support syncing them.

Sauce "seems" to bring in whatever values that are in My Profile. And they're in blue, not orange.

Yup, that's right. Blue = From Strava directly, orange = learned by Sauce or manually overridden. In the case of sync being active for an athlete it will be orange because it takes the values from the Sauce athlete database table instead of Strava (see aforementioned details).

Also, while we're on the "Advanced Options" window. Who are all those other athletes I see there? I recognize them all, but what brought them in there?

Those are just breadcrumbs from any athletes who's activities you've visited. The lastknown and override values are the values Sauce most recently detected in an activity for that athlete or the value you set for them by clicking the FTP/Weight on an activity to override the values. The lastknown values are because Strava doesn't always include weight or ftp. Runs, for example, never include weight so it's useful to "remember" any values seen for that athlete on their other activities which did have weight/ftp. Then later on a run activity we can calculate things like w/kg and TSS, regardless of Strava's inclusion of a weight/FTP.

Bear in mind these values are only applicable to athletes that you do NOT sync. When an athlete is sync'd there is a separate database table not shown in that advanced panel.

mostafamossaad commented 2 years ago

I'm so confused right now I don't even know where to begin.

I'm not even sure what you meant by "syncing this athlete with Sauce Performance".

So, here's what I'm doing, and here's what I hope I get.

I'm synchronizing my weight from a platform to my Strava profile, in the hopes of having this day's weight reflect on my activities.

This "should" happen daily. That's why I was wondering if this entry was the right one because it mentioned weight "history".

That could also be why I don't understand it when my weight is in Orange (Learned by Sauce) as you mentioned as I'm not sure how that would happen (Possibly the syncing with Sauce Performance?)


From: Justin Mayfield @.> Sent: Wednesday, July 6, 2022 10:55 PM To: SauceLLC/sauce4strava @.> Cc: mostafamossaad @.>; Comment @.> Subject: Re: [SauceLLC/sauce4strava] Sync weight changes to weight history (Issue #74)

Hello, not sure if this is the right place for this, but here goes. I have my weight syncing from another platform to Strava. Which shows in "My Profile". However, it doesn't seem to be reflected in the Sauce section of "weight" on any of my activities. Is this the issue here?

If you're syncing this athlete with Sauce Performance, then this is your issue too. With sync active the weight and FTP values used by sauce are managed separately from the Strava profile settings, as of today. The intent of this enhancement is to support syncing them.

Sauce "seems" to bring in whatever values that are in My Profile. And they're in blue, not orange.

Yup, that's right. Blue = From Strava directly, orange = learned by Sauce or manually overridden. In the case of sync being active for an athlete it will be orange because it takes the values from the Sauce athlete database table instead of Strava (see aforementioned details).

Also, while we're on the "Advanced Options" window. Who are all those other athletes I see there? I recognize them all, but what brought them in there?

Those are just breadcrumbs from any athletes who's activities you've visited. The lastknown and override values are the values Sauce most recently detected in an activity for that athlete or the value you set for them by clicking the FTP/Weight on an activity to override the values. The lastknown values are because Strava doesn't always include weight or ftp. Runs, for example, never include weight so it's useful to "remember" any values seen for that athlete on their other activities which did have weight/ftp. Then later on a run activity we can calculate things like w/kg and TSS, regardless of Strava's inclusion of a weight/FTP.

Bear in mind these values are only applicable to athletes that you do NOT sync. When an athlete is sync'd there is a separate database table not shown in that advanced panel.

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSauceLLC%2Fsauce4strava%2Fissues%2F74%23issuecomment-1176732854&data=05%7C01%7C%7C269cc9d4bfc243d7aca508da5f91ed6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637927377637037639%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jZed2gcucmGJRIgvuhf7ybVg5ZDMpMhh946nyfw59TA%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAZK7QMVVJMDSQZ7HJLCJDDVSXXF3ANCNFSM5L7YGIAA&data=05%7C01%7C%7C269cc9d4bfc243d7aca508da5f91ed6a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637927377637037639%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=aUULg2rA2g%2FbvQjMieu4XyPEYJCGW41zXLEj1%2FgXSQE%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

mayfield commented 2 years ago

syncing this athlete

The optional patreon feature set Sauce Performance lets you sync an athlete so you can do perf mgmt charts and other multi-activity time-series calcs like ATL/CTL.

image

I'm not sure you're using this feature set or not, but it changes the way FTP and weight are handled by Sauce.

That could also be why I don't understand it when my weight is in Orange (Learned by Sauce) as you mentioned as I'm not sure how that would happen (Possibly the syncing with Sauce Performance?)

If you're not syncing with Sauce Performance it's probably a left of manual override. If you go back to that advanced panel and find your entry in the Athlete Info section and remove it, it should always prefer to use the Strava profile based value after that. The thing to note there, is if the weight_override value is set for your athlete entry. That indicates that at some point in time you clicked the FTP and put a value in it. Oh I just remembered you can click the weight on one of your activities and just delete the value and hit enter, that should have the same effect.

mostafamossaad commented 2 years ago

I'm definitely not using Sauce Performance or any kind of athlete sync. And if this is the case, how can I "clear" the values and force a revert to the values in my Strava profile?


From: Justin Mayfield @.> Sent: Wednesday, July 6, 2022 11:31 PM To: SauceLLC/sauce4strava @.> Cc: mostafamossaad @.>; Comment @.> Subject: Re: [SauceLLC/sauce4strava] Sync weight changes to weight history (Issue #74)

syncing this athlete

The optional patreon feature set Sauce Performance lets you sync an athlete so you can do perf mgmt charts and other multi-activity time-series calcs like ATL/CTL.

[image]https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F139316%2F177646331-00311d79-895c-4471-9062-2a728a800efd.png&data=05%7C01%7C%7C93474fd19219496fd1a208da5f96e16a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637927398918141607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=oyb3IbVq8WiQfjeOCSEf41S6p4%2FmpzVnlTl%2BMKMJL2U%3D&reserved=0

I'm not sure you're using this feature set or not, but it changes the way FTP and weight are handled by Sauce.

That could also be why I don't understand it when my weight is in Orange (Learned by Sauce) as you mentioned as I'm not sure how that would happen (Possibly the syncing with Sauce Performance?)

If you're not syncing with Sauce Performance it's probably a left of manual override. If you go back to that advanced panel and find your entry in the Athlete Info section and remove it, it should always prefer to use the Strava profile based value after that. The thing to note there, is if the weight_override value is set for your athlete entry. That indicates that at some point in time you clicked the FTP and put a value in it. Oh I just remembered you can click the weight on one of your activities and just delete the value and hit enter, that should have the same effect.

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSauceLLC%2Fsauce4strava%2Fissues%2F74%23issuecomment-1176768611&data=05%7C01%7C%7C93474fd19219496fd1a208da5f96e16a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637927398918141607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tvK5s63KRC2M4fcOajaKKVW5hPtHi0HSpOxfsY1MBKY%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAZK7QNFBX3UVNINGBDT7K3VSX3K3ANCNFSM5L7YGIAA&data=05%7C01%7C%7C93474fd19219496fd1a208da5f96e16a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637927398918141607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=4sAmada98M9eIc2BDQlsfz92IPuG4tJppPdCCUhbZyo%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

mayfield commented 2 years ago

From my last post, try this, "click the weight on one of your activities and just delete the value and hit enter, that should have the same effect."

If that doesn't work, hit me up at support@saucellc.io

mostafamossaad commented 2 years ago

I think it did. And I think I get it now. Even though some are now showing in blue on their own, and some are still in orange, even after deleting the values, pressing "Enter" and refreshing the page.

How can I try Sauce Performance/Athlete sync? Even though I'm a TrainingPeaks premium, I'd like to take a look if that's OK. PS: I understand the Patreon membership option, just wondering if there can be some sort of a trial first?


From: Justin Mayfield @.> Sent: Thursday, July 7, 2022 12:04 AM To: SauceLLC/sauce4strava @.> Cc: mostafamossaad @.>; Comment @.> Subject: Re: [SauceLLC/sauce4strava] Sync weight changes to weight history (Issue #74)

From my last post, try this, "click the weight on one of your activities and just delete the value and hit enter, that should have the same effect."

If that doesn't work, hit me up at @.**@.>

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSauceLLC%2Fsauce4strava%2Fissues%2F74%23issuecomment-1176795663&data=05%7C01%7C%7C0805f79973694e62a4a108da5f9b78fa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637927418630966834%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yLzqsDrGgfyazuBuFLukv%2BZgI9JexnzXIKJ17acwspE%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAZK7QINON2UQ23RRIH7SBTVSX7GDANCNFSM5L7YGIAA&data=05%7C01%7C%7C0805f79973694e62a4a108da5f9b78fa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637927418630966834%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=31J7ZNiR8E2Lo8lvkSjC2%2FmbcC%2Fe4N3%2FMnGa8XOPHVE%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

MrSpock77 commented 2 years ago

The intent of this enhancement is to support syncing them.

The lastknown and override values are the values Sauce most recently detected in an activity for that athlete or the value you set for them by clicking the FTP/Weight on an activity to override the values. The lastknown values are because Strava doesn't always include weight or ftp. Runs, for example, never include weight so it's useful to "remember" any values seen for that athlete on their other activities which did have weight/ftp.

Wouldn't it be quite easy to update the FTP history automatically whenever Sauce detects a changed weight/FTP value in an activity?

mostafamossaad commented 2 years ago

I feel like I'm taking a lot of your time here. I apologize for that.

That's why I'm asking about Sauce Performance and athlete sync.

If I understand it correctly, this would offer a (similar?) experience to TrainingPeaks where an athlete's weight is tracked daily. Come to think of it, there's not much sense, performance analysis-wise, for Strava to keep a static, non-rolling, weight for an athlete in their profile.

Here's a plot twist/curve ball. For activities uploaded from recording devices (Not the Strava app), think Garmin/Wahoo devices. And that should be a relatively large portion of the user base interested in Sauce. Wouldn't the FIT files coming from Garmin contain an athlete's weight? Because if they do, that would be brilliant and you wouldn't need to track any history. Just read the weight from the FIT file (If it's there. Big assumption, I know) and just add it to the activity (Same for FTP, obviously).

Still curious how Sauce can "detect" weight or FTP values in activity though.


From: MrSpock77 @.> Sent: Thursday, July 7, 2022 9:33 AM To: SauceLLC/sauce4strava @.> Cc: mostafamossaad @.>; Comment @.> Subject: Re: [SauceLLC/sauce4strava] Sync weight changes to weight history (Issue #74)

The intent of this enhancement is to support syncing them.

The lastknown and override values are the values Sauce most recently detected in an activity for that athlete or the value you set for them by clicking the FTP/Weight on an activity to override the values. The lastknown values are because Strava doesn't always include weight or ftp. Runs, for example, never include weight so it's useful to "remember" any values seen for that athlete on their other activities which did have weight/ftp.

Wouldn't it be quite easy to update the FTP history automatically whenever Sauce detects a changed weight/FTP value in an activity?

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSauceLLC%2Fsauce4strava%2Fissues%2F74%23issuecomment-1177195969&data=05%7C01%7C%7Ce0c3fb11560b40d40dc908da5feaf05b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637927759933585095%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bPptkc7J5kXjpjoG0rgDoVG2GXJ9f0X1KACugAi5rZg%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAZK7QJ7ZQ4ZWRIJG2ZICYDVS2B3HANCNFSM5L7YGIAA&data=05%7C01%7C%7Ce0c3fb11560b40d40dc908da5feaf05b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637927759933585095%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=C8xf4yj9t8ptSnPyDvvqo5yuwEbBloNulQtCCsyKM6w%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

mayfield commented 2 years ago

PS: I understand the Patreon membership option, just wondering if there can be some sort of a trial first?

You can sign up and cancel before the 1st-5th when patreon does billing. I don't use the pay-up-front mode, so there is a grace period (usually).

mayfield commented 2 years ago

If I understand it correctly, this would offer a (similar?) experience to TrainingPeaks where an athlete's weight is tracked daily.

Pretty much, except as per this issue, Sauce isn't syncing with Strava's profile value so you have to manually manage the weight and FTP values yourself in Sauce Performance's athlete settings.

Wouldn't the FIT files coming from Garmin contain an athlete's weight?

They can, but aren't required to. However, Strava ignores this value altogether and the Sauce extension doesn't have access to the original FIT file either. Sauce (or any browser extension) can only see some curated metadata provided from Strava and raw data streams for time, power, distance, etc. Almost all the calculations you see from Sauce are computed in realtime from the raw data on each page load.

Still curious how Sauce can "detect" weight or FTP values in activity though.

When it's made available, it's just in the javascript runtime where extensions can see it.

mostafamossaad commented 2 years ago

Well, I think I now finally understand the original issue posted here. Cool. Thanks. And best of luck working on it.

My college programming days are way behind me, but couldn’t you access the FIT file by using the “export_original” (parameter?). You’ll need to put the file “somewhere” and (scour?) it for the data you need? (Weight and FTP).

Anyway. Like I said, I’m taking so much of your time. I finally understood what I didn’t before, so thank you very much.

Beat of luck.

Téléchargez Outlook pour iOShttps://aka.ms/o0ukef


De : Justin Mayfield @.> Envoyé : Friday, July 8, 2022 12:09:20 AM À : SauceLLC/sauce4strava @.> Cc : mostafamossaad @.>; Comment @.> Objet : Re: [SauceLLC/sauce4strava] Sync weight changes to weight history (Issue #74)

If I understand it correctly, this would offer a (similar?) experience to TrainingPeaks where an athlete's weight is tracked daily.

Pretty much, except as per this issue, Sauce isn't syncing with Strava's profile value so you have to manually manage the weight and FTP values yourself in Sauce Performance's athlete settings.

Wouldn't the FIT files coming from Garmin contain an athlete's weight?

They can, but aren't required to. However, Strava ignores this value altogether and the Sauce extension doesn't have access to the original FIT file either. Sauce (or any browser extension) can only see some curated metadata provided from Strava and raw data streams for time, power, distance, etc. Almost all the calculations you see from Sauce are computed in realtime from the raw data on each page load.

Still curious how Sauce can "detect" weight or FTP values in activity though.

When it's made available, it's just in the javascript runtime where extensions can see it.

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSauceLLC%2Fsauce4strava%2Fissues%2F74%23issuecomment-1178278400&data=05%7C01%7C%7C6a6d7c128262489fc0a808da60655838%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637928285662471506%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Q0TE%2FpDTLZKxFsr%2BQ8zIfSLT14DGt%2B4EyIfyaypq%2F1U%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAZK7QKGM7ENS4FOOPD572DVS5IRBANCNFSM5L7YGIAA&data=05%7C01%7C%7C6a6d7c128262489fc0a808da60655838%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637928285662471506%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=awl%2BlsiYsgfOKPBkekWUyLvuohWdY0kN3CWV%2Fz2j%2FFw%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

mayfield commented 2 years ago

My college programming days are way behind me, but couldn’t you access the FIT file by using the “export_original” (parameter?). You’ll need to put the file “somewhere” and (scour?) it for the data you need? (Weight and FTP).

If all else fails I might try this but I think I have other means that won't require such a big hammer. See #84