wger-project / wger

Self hosted FLOSS fitness/workout, nutrition and weight tracker
https://wger.de
GNU Affero General Public License v3.0
3.22k stars 584 forks source link

Synchronize data with other fitness trackers #1111

Open rolandgeider opened 2 years ago

rolandgeider commented 2 years ago

Add some kind of data Synchronisation with other fitness trackers (general issue for discussion)

Some questions:

cvantum commented 2 years ago

Hello,

i saw your project at the hacktoberfest 2022. Related to this issue i would prospose to implement Strava since most fitness trackers (like Garmin, Wahoo, Polar) build already a connection. So tracked Data can be synced with strava and should be available via API (https://developers.strava.com/docs/reference/#api-Activities-getActivityById).

An actictiy has also a keyword for calories. The only downside could maybe the API-Access Limitation:

Strava API usage is limited on a per-application basis using both a 15-minute and daily request limit. The default rate limit allows 100 requests every 15 minutes, with up to 1,000 requests per day.
rolandgeider commented 2 years ago

Hi! From what I've seen, strava does mainly things like running, cycling and so on, right? Also the calories we get are the ones consumed during the activity which we currently don't track (but could, this wouldn't be a bad idea, I've opened a new issue for this)

MrRulf commented 1 year ago

I think gadgetbridge can also be used as a provider for data from smart devices. FitoTrack also seems like an option. Just to provide compatibility with open source watches.

fuveluck commented 1 year ago

Hi threre, Can I ask what situation is with this issue? Is there any progress in discussion?

rolandgeider commented 1 year ago

The idea is to add some snychronization service that periodically pulls datainto our database. Things that we still need to do/find out:

So basically the specifics on this depend on where we get the data from. If you are interested @fuveluck I can take a look and see which options we have on that side

CEbbinghaus commented 9 months ago

Pretty sure that Google Fitness has a good API encouraging others to integrate with it. As such I would propose that as a first integration, Google would be used.

MrRulf commented 8 months ago

Android 14 introduced Health Connect, completely on the device and as part of AOSP, not play services exclusive or something, I would highly recommend to make compatibility with that the priority, before custom solutions for other apps get built, as the idea behind Health Connect seems to be that it becomes the main place, where all health data can be synced to and exchanged over it trough different apps

rolandgeider commented 8 months ago

yes, somebody at Fosdem also suggested this, sounds like something we want to investigate further. A (very) quick search resulted in two flutter packages that seem to support this, so this might be relatively painless to do (well, besides all the backend changes we will need 😅 )

MrRulf commented 8 months ago

Oof, hope its not too much stuff ^^" At least helth connect seems like something that is going to stay, considering foss people will prob like it cuz its not bound to google, samsung or anyone, while the projects at the same time still have google, samsung and i think others too behind it ^^

rolandgeider commented 8 months ago

well, currently there is no good place to store such data. Plus we will want to show it somewhere useful. But if the import is easy, that will make a big difference, I was worried we would need to maintain custom code for each service

MrRulf commented 8 months ago

It seems lile this could solve the custom code for each service problem quite well ^^ I dont know if health connect has built in methods to visualize data, I think it really is mainly a llace to collect and distribute the data, so the visualizing can be done by different apps, wger can say they wanna build that into the app directly, but users could also just have another app to visualize the data. I really like how modular it is and that apps now dont have to bother with fancy visualisation or processing when they just track one simple exercise, while apps with focus on processing and visualisation, maybe even without the ability to track excersises, can exist now and do what they are great at on all the health data a user provides

CEbbinghaus commented 8 months ago

Health Connect sounds like a far superior option. Being bound to Android 14 isn't perfect as there are plenty of devices in use today that will never get the new version but Looking into the future it seems like the best choice. And keeping all data on device while allowing all kinds of fitness apps to communicate data is perfect from a privacy standpoint. I wholeheartedly support this proposal

Dieterbe commented 7 months ago

Strava has not shown interest in syncing their data to health connect (see this support thread or this community thread which is collecting kudos and comments. a community manager commented 2 months ago it's still not planned, but maybe more comments/kudos will help). However, they do seem to have some sync with Apple Health (they have a tutorial for it) so perhaps health connect will follow too..