Sync to runalyze #300

Closed
piratenpanda opened this Issue Aug 5, 2015 · 30 comments

Comments

Projects
None yet
@piratenpanda

I don't know if runalyze can import sync data but as it's also free software it would be nice if you could cooperate in some way :)

https://runalyze.com/login.php

@sporkbyspork

This comment has been minimized.

Show comment
Hide comment
@sporkbyspork

sporkbyspork Sep 2, 2015

This would be really great. By self-hosting Runalyze, you wouldn't need to give the data collected by Runnerup away to third parties.

This would be really great. By self-hosting Runalyze, you wouldn't need to give the data collected by Runnerup away to third parties.

@jonasoreland

This comment has been minimized.

Show comment
Hide comment
@jonasoreland

jonasoreland Sep 2, 2015

Owner

hmm...it seems this is also open source,
https://github.com/Runalyze/Runalyze
so it should be very doable to fix synchronization.

On Wed, Sep 2, 2015 at 11:13 AM, sporkbyspork notifications@github.com
wrote:

This would be really great. By self-hosting Runalyze, you wouldn't need to
give the data collected by Runnerup away to third parties.


Reply to this email directly or view it on GitHub
#300 (comment)
.

Owner

jonasoreland commented Sep 2, 2015

hmm...it seems this is also open source,
https://github.com/Runalyze/Runalyze
so it should be very doable to fix synchronization.

On Wed, Sep 2, 2015 at 11:13 AM, sporkbyspork notifications@github.com
wrote:

This would be really great. By self-hosting Runalyze, you wouldn't need to
give the data collected by Runnerup away to third parties.


Reply to this email directly or view it on GitHub
#300 (comment)
.

@lenucksi

This comment has been minimized.

Show comment
Hide comment
@lenucksi

lenucksi Dec 25, 2015

That would be splendid for the reasons @sporkbyspork named!
They appear to already support quite a number of sync services.
👍

That would be splendid for the reasons @sporkbyspork named!
They appear to already support quite a number of sync services.
👍

@mipapo

This comment has been minimized.

Show comment
Hide comment
@mipapo

mipapo Dec 30, 2015

Should be no problem, when we have our API. Please stay tuned. We will inform you!

mipapo commented Dec 30, 2015

Should be no problem, when we have our API. Please stay tuned. We will inform you!

@mipapo mipapo referenced this issue in Runalyze/Runalyze Dec 30, 2015

Open

Inform other services about API availability #1648

0 of 11 tasks complete
@RunningCl0ud

This comment has been minimized.

Show comment
Hide comment
@RunningCl0ud

RunningCl0ud Feb 9, 2016

I cross my fingers and hope you make it happen @mipapo 👍

I cross my fingers and hope you make it happen @mipapo 👍

@powellc

This comment has been minimized.

Show comment
Hide comment
@powellc

powellc Feb 13, 2016

Anyone else working on this? Otherwise I've got a pull request coming in a few here.

powellc commented Feb 13, 2016

Anyone else working on this? Otherwise I've got a pull request coming in a few here.

@mipapo

This comment has been minimized.

Show comment
Hide comment
@mipapo

mipapo Feb 13, 2016

@powellc Without our API it will be just a dirty hack. So my recommendation is to wait for it ;)

mipapo commented Feb 13, 2016

@powellc Without our API it will be just a dirty hack. So my recommendation is to wait for it ;)

@powellc

This comment has been minimized.

Show comment
Hide comment
@powellc

powellc Feb 13, 2016

Yeah, after I posted that I took a look at Runalyze source and realized what I was up against! Also I haven't done PHP work in years so I don't trust myself to work on that codebase ... I'll wait. In the meantime, just getting gpx files in ownCloud would be awesome, so I'm working on that.

powellc commented Feb 13, 2016

Yeah, after I posted that I took a look at Runalyze source and realized what I was up against! Also I haven't done PHP work in years so I don't trust myself to work on that codebase ... I'll wait. In the meantime, just getting gpx files in ownCloud would be awesome, so I'm working on that.

@Marx2

This comment has been minimized.

Show comment
Hide comment
@Marx2

Marx2 May 15, 2016

I've succesfully launched selfhosted runalyze site, and imported all my trainings from RunnerUp through gpx files (downloaded from Strava). It would be great to have it automated. And it would be great to integrate live positioning on the map during run with this webapp.

Marx2 commented May 15, 2016

I've succesfully launched selfhosted runalyze site, and imported all my trainings from RunnerUp through gpx files (downloaded from Strava). It would be great to have it automated. And it would be great to integrate live positioning on the map during run with this webapp.

@Marx2

This comment has been minimized.

Show comment
Hide comment
@Marx2

Marx2 Jul 28, 2016

As their API doesn't seem to appear in a near feature, maybe it would be nice to implement so called "dirty solution"
referenced here:
Runalyze/Runalyze#498
https://gist.github.com/mipapo/cafe45b0c2a247d9c0614bd2cc8fe4d0

Marx2 commented Jul 28, 2016

As their API doesn't seem to appear in a near feature, maybe it would be nice to implement so called "dirty solution"
referenced here:
Runalyze/Runalyze#498
https://gist.github.com/mipapo/cafe45b0c2a247d9c0614bd2cc8fe4d0

@mipapo

This comment has been minimized.

Show comment
Hide comment
@mipapo

mipapo Jul 28, 2016

I'm not sure if it would be a great idea to do this.
I really try to get the basic API done by the end of the year.
Next RUNALYZE release will be 3.0 and I think we will just getting faster after that version in our development process. I'm getting more confident that we manage that this year

(By the way - with 2.x it's only possible to have one user authenticated on once device simultaneously - this will change with 3.0)

mipapo commented Jul 28, 2016

I'm not sure if it would be a great idea to do this.
I really try to get the basic API done by the end of the year.
Next RUNALYZE release will be 3.0 and I think we will just getting faster after that version in our development process. I'm getting more confident that we manage that this year

(By the way - with 2.x it's only possible to have one user authenticated on once device simultaneously - this will change with 3.0)

@rickyepoderi

This comment has been minimized.

Show comment
Hide comment
@rickyepoderi

rickyepoderi Aug 15, 2016

Contributor

Hi everyone,

I have implemented a very simple automatic synchronizer to runalyze. It is very simple and follows the ideas presented previously in this blog entry. The basics are quite simple:

  • A new auth method is created in order to let you change the connection URL (by default the public runalyze url is presented). I want to use my own runalyze.
  • A new format RunzalizePost parses the database and writes the enormous post data runalyze needs.
  • The synchronizer just uploads the activity (no more features).

There are some quirks with conversions of IDs, calories and so on but it works. The branch is my repo:

https://github.com/rickyepoderi/runnerup/tree/runalyze

I'm open to make changes or any other improvements (just I can't guarantee any schedule, sorry I have very little free time). When you agree I can submit a pull request.

Thanks!

Contributor

rickyepoderi commented Aug 15, 2016

Hi everyone,

I have implemented a very simple automatic synchronizer to runalyze. It is very simple and follows the ideas presented previously in this blog entry. The basics are quite simple:

  • A new auth method is created in order to let you change the connection URL (by default the public runalyze url is presented). I want to use my own runalyze.
  • A new format RunzalizePost parses the database and writes the enormous post data runalyze needs.
  • The synchronizer just uploads the activity (no more features).

There are some quirks with conversions of IDs, calories and so on but it works. The branch is my repo:

https://github.com/rickyepoderi/runnerup/tree/runalyze

I'm open to make changes or any other improvements (just I can't guarantee any schedule, sorry I have very little free time). When you agree I can submit a pull request.

Thanks!

@mipapo

This comment has been minimized.

Show comment
Hide comment
@mipapo

mipapo Aug 15, 2016

@rickyepoderi The URI won't work with the upcoming release (v3.0). activity/add instead of call/call.Training.create.php should be the new one
(everything else should be fine then - fyi: with version 3.0 a user can be now logged in with multiple devices at once)
It would be better if a tcx file could be "pushed" to RUNALYZE (Runalyze does the rest)

With the release of version 3.0 we are really coming closer to an official API.

mipapo commented Aug 15, 2016

@rickyepoderi The URI won't work with the upcoming release (v3.0). activity/add instead of call/call.Training.create.php should be the new one
(everything else should be fine then - fyi: with version 3.0 a user can be now logged in with multiple devices at once)
It would be better if a tcx file could be "pushed" to RUNALYZE (Runalyze does the rest)

With the release of version 3.0 we are really coming closer to an official API.

@rickyepoderi

This comment has been minimized.

Show comment
Hide comment
@rickyepoderi

rickyepoderi Aug 15, 2016

Contributor

@mipapo We can change it later or check the two urls at connection time (when configuring username and password). But if v3.0 is going to have an API (I hope it's a restful WS api) we can redo the synchronizer then and adapt it properly to the new version, making it as full-featured as possible.

But the reality is that now it's impossible to upload my data to my own server, which annoys me a lot, I have to say.

Contributor

rickyepoderi commented Aug 15, 2016

@mipapo We can change it later or check the two urls at connection time (when configuring username and password). But if v3.0 is going to have an API (I hope it's a restful WS api) we can redo the synchronizer then and adapt it properly to the new version, making it as full-featured as possible.

But the reality is that now it's impossible to upload my data to my own server, which annoys me a lot, I have to say.

@mipapo

This comment has been minimized.

Show comment
Hide comment
@mipapo

mipapo Aug 15, 2016

@rickyepoderi The API will come later with a version of 3.* (Not directly with 3.0) (Yes it will be a RESTFUL WS API)

mipapo commented Aug 15, 2016

@rickyepoderi The API will come later with a version of 3.* (Not directly with 3.0) (Yes it will be a RESTFUL WS API)

@rickyepoderi

This comment has been minimized.

Show comment
Hide comment
@rickyepoderi

rickyepoderi Aug 15, 2016

Contributor

Fantastic! Then I think the better approach is trying to guess the URL when defining the synchronizer (try one, if 404 or something, the other). Later on, somebody should redo the synch for the API. Is there some alpha or beta for 3.0? Should I compile myself from current github?

Contributor

rickyepoderi commented Aug 15, 2016

Fantastic! Then I think the better approach is trying to guess the URL when defining the synchronizer (try one, if 404 or something, the other). Later on, somebody should redo the synch for the API. Is there some alpha or beta for 3.0? Should I compile myself from current github?

@mipapo

This comment has been minimized.

Show comment
Hide comment
@mipapo

mipapo Aug 15, 2016

@rickyepoderi You could get a tester (write a mail to us). Latest master-dev package is available at dl.runalyze.com
Checkout the administration docs: https://docs.runalyze.com/en/latest/ (Also when you want to checkout directly from github)
@rickyepoderi Or just checkout the beta at https://svn.runalyze.com

mipapo commented Aug 15, 2016

@rickyepoderi You could get a tester (write a mail to us). Latest master-dev package is available at dl.runalyze.com
Checkout the administration docs: https://docs.runalyze.com/en/latest/ (Also when you want to checkout directly from github)
@rickyepoderi Or just checkout the beta at https://svn.runalyze.com

@rickyepoderi

This comment has been minimized.

Show comment
Hide comment
@rickyepoderi

rickyepoderi Aug 15, 2016

Contributor

Ok, I have just prepared my synchronizer to detect v2 and v3. Finally v3 also changes the way to login (it seems that runalyze uses now a new framework and everything is a bit different), so finally with the login the synchronizer can detect if the version is 3.x or 2.x and then call proper URLs.

@mipapo Can you confirm the same post fields are used in both versions? I have uploaded five or six activities and no problem with the upload (just changing the URL they were uploaded successfully).

The changes are incorporated to my branch if you want to test.

Contributor

rickyepoderi commented Aug 15, 2016

Ok, I have just prepared my synchronizer to detect v2 and v3. Finally v3 also changes the way to login (it seems that runalyze uses now a new framework and everything is a bit different), so finally with the login the synchronizer can detect if the version is 3.x or 2.x and then call proper URLs.

@mipapo Can you confirm the same post fields are used in both versions? I have uploaded five or six activities and no problem with the upload (just changing the URL they were uploaded successfully).

The changes are incorporated to my branch if you want to test.

@mipapo

This comment has been minimized.

Show comment
Hide comment
@mipapo

mipapo Aug 15, 2016

@mipapo Can you confirm the same post fields are used in both versions?

Yes!

mipapo commented Aug 15, 2016

@mipapo Can you confirm the same post fields are used in both versions?

Yes!

@rickyepoderi

This comment has been minimized.

Show comment
Hide comment
@rickyepoderi

rickyepoderi Aug 16, 2016

Contributor

I have released a debug version in case you want to test (please do a backup before, this is at your own rick). I have tested with my own phone. I'd just test it and revert to the original app (restoring the backup). Here is the link:

https://github.com/rickyepoderi/runnerup/releases/tag/v1.54-alpha

Please connect to a runnalyze account (2.x and 3.x would be great) and import some activities. Remember that the URL should be changed if you want to test your own server (if your installation has a path, for example http://192.168.1.2/runalyze, you have to include the context too).

Contributor

rickyepoderi commented Aug 16, 2016

I have released a debug version in case you want to test (please do a backup before, this is at your own rick). I have tested with my own phone. I'd just test it and revert to the original app (restoring the backup). Here is the link:

https://github.com/rickyepoderi/runnerup/releases/tag/v1.54-alpha

Please connect to a runnalyze account (2.x and 3.x would be great) and import some activities. Remember that the URL should be changed if you want to test your own server (if your installation has a path, for example http://192.168.1.2/runalyze, you have to include the context too).

@rickyepoderi

This comment has been minimized.

Show comment
Hide comment
@rickyepoderi

rickyepoderi Sep 3, 2016

Contributor

Has somebody tested the release or checked the code changes?
Are you interested in this?
Is it ok if I submit a pull request?

Contributor

rickyepoderi commented Sep 3, 2016

Has somebody tested the release or checked the code changes?
Are you interested in this?
Is it ok if I submit a pull request?

@mipapo

This comment has been minimized.

Show comment
Hide comment
@mipapo

mipapo Sep 3, 2016

Just a feedback from my site: It's working for me

mipapo commented Sep 3, 2016

Just a feedback from my site: It's working for me

@jonasoreland

This comment has been minimized.

Show comment
Hide comment
@jonasoreland

jonasoreland Sep 3, 2016

Owner

pull request sounds like a good idea!!

On Sat, Sep 3, 2016 at 6:52 PM, Michael Pohl notifications@github.com
wrote:

Just a feedback from my site: It's working for me


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#300 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABYS1j-mhJ9t4YeZmG9aNRguuG7oOZEks5qmaXKgaJpZM4Fl2vD
.

Owner

jonasoreland commented Sep 3, 2016

pull request sounds like a good idea!!

On Sat, Sep 3, 2016 at 6:52 PM, Michael Pohl notifications@github.com
wrote:

Just a feedback from my site: It's working for me


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#300 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABYS1j-mhJ9t4YeZmG9aNRguuG7oOZEks5qmaXKgaJpZM4Fl2vD
.

jonasoreland added a commit that referenced this issue Sep 7, 2016

@Marx2

This comment has been minimized.

Show comment
Hide comment
@Marx2

Marx2 Jan 25, 2017

As we have Runalyze synchronization merged and working, shouldn't we close this task?

Marx2 commented Jan 25, 2017

As we have Runalyze synchronization merged and working, shouldn't we close this task?

@craftyguy

This comment has been minimized.

Show comment
Hide comment
@craftyguy

craftyguy Apr 4, 2017

Something is off a bit. When I try to sync an activity in runnerup that is 'biking', it gets synced to runalyze as a running activity.

Something is off a bit. When I try to sync an activity in runnerup that is 'biking', it gets synced to runalyze as a running activity.

@rickyepoderi

This comment has been minimized.

Show comment
Hide comment
@rickyepoderi

rickyepoderi Apr 4, 2017

Contributor

@craftyguy Please open a new issue and be sure to include my name @rickyepoderi on it.

I always run (and I never cycling) so I personally have never tested another activity. In theory the column DB.ACTIVITY.SPORT from table Constants.DB.ACTIVITY.TABLE is read, transform into an Sport.valueOf(dbValue) and then if sport.isCycling() a 3 is returned. The magic 3 number is because in my ddbb was like this.

Please add to the bug if you are using your own server o the runalyze.com web.

Contributor

rickyepoderi commented Apr 4, 2017

@craftyguy Please open a new issue and be sure to include my name @rickyepoderi on it.

I always run (and I never cycling) so I personally have never tested another activity. In theory the column DB.ACTIVITY.SPORT from table Constants.DB.ACTIVITY.TABLE is read, transform into an Sport.valueOf(dbValue) and then if sport.isCycling() a 3 is returned. The magic 3 number is because in my ddbb was like this.

Please add to the bug if you are using your own server o the runalyze.com web.

@mipapo

This comment has been minimized.

Show comment
Hide comment
@mipapo

mipapo Apr 4, 2017

@rickyepoderi I think that "3" was your local sport id. You would need to read all the users sport names and map the sport name to your sport.isCycling() method.

By the way: The next version of Runalyze will have some configureable "fixed" sport types. So we are getting closer to an API

mipapo commented Apr 4, 2017

@rickyepoderi I think that "3" was your local sport id. You would need to read all the users sport names and map the sport name to your sport.isCycling() method.

By the way: The next version of Runalyze will have some configureable "fixed" sport types. So we are getting closer to an API

@gerhardol

This comment has been minimized.

Show comment
Hide comment
@gerhardol

gerhardol Aug 8, 2017

Collaborator

Mapping included in v1.58 (but upload fails for other reasons, new issue?)

Collaborator

gerhardol commented Aug 8, 2017

Mapping included in v1.58 (but upload fails for other reasons, new issue?)

@gerhardol gerhardol closed this Aug 8, 2017

@Marx2

This comment has been minimized.

Show comment
Hide comment
@Marx2

Marx2 Aug 9, 2017

Marx2 commented Aug 9, 2017

@gerhardol

This comment has been minimized.

Show comment
Hide comment
@gerhardol

gerhardol Aug 9, 2017

Collaborator

@Marx2 This issue was about synching to Runalyze
I suggest you open a new issue that clearly is about the planned upload API for future changes

Collaborator

gerhardol commented Aug 9, 2017

@Marx2 This issue was about synching to Runalyze
I suggest you open a new issue that clearly is about the planned upload API for future changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment