openambitproject / openambit

openambit
277 stars 82 forks source link

Not able to connect to movescount on fresh install #272

Closed tfilo closed 3 years ago

tfilo commented 3 years ago

Hello, i made fresh "installation" of openambit today (./build.sh, ./run.sh). App is working but I am unable to connect to movescount account. After I click Auth on movescount, movescount is opened in browser but it not ask to allow connection. I don't see any new request in settings/connectiosn too. I understand that suunto migrates to different platform, and I am ok with synchronization of my moves to strava only. But I need to synchronize settings for my watch. How can i do that when I am unable to connect to movescount. I have Sunnto 2 so no bluetooth and android app posibility. I don't have windows so I rely on openambit. Thank you for answer.

centic9 commented 3 years ago

See discussions at #216 and #270, Suunto is slowly shutting down movescount functionality. They now disabled the current APPKEY completely, thus disabling Openambit access fully for now. A new APPKEY was discussed in the first issue and may continue to work, but it will reqiure a new userKey. So you will likely need to install the windows software at least one and extract the new resulting userKey there.

This is all still in flux by Suunto as things were disabled more and more over the last few days, so I will wait some more time until they have finalized their changes before starting to try to integrate changes into Openambit and/or update instructions.

You can help by posting if you succeed with some of the things discussed in the other issue.

marguslt commented 3 years ago

I can't test with Openambit at the moment, but you can authenticate with Suuntolink app-key through https://www.movescount.com/auth?client_id=DbCBVqja20NKdrimBHQxtYIdczUJ56WHIWlC6A7vp6NPC0D0a8wA5d0ODyywFKe6 image After successful login: image Just make sure you catch that re-direction after logging in, it includes the user-key that must be used with Openambit: image

centic9 commented 3 years ago

I think this is done from openambit-side as far as I can see.

Additionally the "openambit-cli" binary now has support for using local settings from a .json file for the sports-mode (and the apps). You can get them written to a local file in JSON format when syncing with movescount via openambit-cli and "--write-config-json".

Then you can edit the files locally and send the settings to the watch via "--custom-config " and "--app-config "

Neat side-effect of this is that you can define more than the default 10 sport-modes!! I now have 15 sport-modes to choose from on the watch! I did not test how much you can exceed the default limit, though. Take care, there is a chance of breaking the watch by writing to much data here!

tfilo commented 3 years ago

Sorry for my late response. Now i pulled new version of openambit with new AppKey and it works out of the box. Thank you all for great work :)

paddy-hack commented 3 years ago

I compiled f332cbbdb1ecb85b7bed08783b734fd42e3ccccb on Devuan beowulf and tried the advice above in an attempt to get a new user key for myself. Looks like the API call sequence has changed a bit but I found my key in the response to https://www.movescount.com/AcceptApp, see the screenshot below

http-network-traffic

I had to make Firefox persist the logs as they were automatically cleared after a few seconds, before I could find the new user key :unamused: Not sure if that's a Movescount issue or a Firefox issue but this was the first time I saw such behaviour.

Updating the movescountUsserKey in my ~/.openambit/openambit.conf let me update my orbital data again :confetti_ball: and started (re)uploading (all?) moves to Movescount, despite (watch the date in the upper-left corner!)

upload-to-movescount-no-longer-possible

and a bunch of OpenAmbit GUI upload error dialogs about LocalTime values being out of order for some of the moves (for moves a few years old). All my February and March 2021 moves were uploaded where before that used to fail (I don't remember exactly when that started, the Suunto page implies 2021-02-09, but everything's been uploaded).

There were also a bunch of messages on standard error, captured below in case it of any use.

Standard error output during sync via GUI Vendor: 1493, Product: 10 libambit_komposti: 2 0 2d 0 Komposit version: 2 0 2d 0 Start reading log... End reading log... Outer space debug message Start sync Orbit End Orbit sync QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-olaf' Movescount replied with ContentConflictError for move ' Running ' from 2015 - 4 - 30 Movescount replied with ContentConflictError for move ' Running ' from 2015 - 5 - 1 Movescount replied with ContentConflictError for move ' Trail running ' from 2015 - 5 - 2 Movescount replied with ContentConflictError for move ' Running ' from 2015 - 5 - 3 Movescount replied with ContentConflictError for move ' Trekking ' from 2015 - 5 - 3 Movescount replied with ContentConflictError for move ' Trail running ' from 2015 - 5 - 5 Movescount replied with ContentConflictError for move ' Alpine skiing ' from 2015 - 11 - 7 Failed to upload log (err code: QNetworkReply::NetworkError(ProtocolInvalidOperationError) ), movescount.com replied with " "" " Failed to upload log (err code: QNetworkReply::NetworkError(ProtocolInvalidOperationError) ), movescount.com replied with " "" " Movescount replied with ContentConflictError for move ' Running ' from 2018 - 6 - 20 Movescount replied with ContentConflictError for move ' Ultra Running ' from 2018 - 6 - 21 Movescount replied with ContentConflictError for move ' Ultra Running ' from 2018 - 6 - 22 Movescount replied with ContentConflictError for move ' Running ' from 2018 - 6 - 23 Movescount replied with ContentConflictError for move ' Ultra Running ' from 2018 - 6 - 24 Movescount replied with ContentConflictError for move ' Running ' from 2018 - 6 - 25 Movescount replied with ContentConflictError for move ' Ultra Running ' from 2018 - 6 - 26 Failed to upload log (err code: QNetworkReply::NetworkError(ProtocolInvalidOperationError) ), movescount.com replied with " "" " Movescount replied with ContentConflictError for move ' Ultra Running ' from 2018 - 6 - 28 Movescount replied with ContentConflictError for move ' Running ' from 2018 - 7 - 4 Movescount replied with ContentConflictError for move ' Running ' from 2018 - 7 - 6 Failed to upload log (err code: QNetworkReply::NetworkError(ProtocolInvalidOperationError) ), movescount.com replied with " "" " Movescount replied with ContentConflictError for move ' Running ' from 2018 - 7 - 8 Movescount replied with ContentConflictError for move ' Running ' from 2018 - 7 - 10 Movescount replied with ContentConflictError for move ' Running ' from 2018 - 7 - 12 Failed to upload log (err code: QNetworkReply::NetworkError(ProtocolInvalidOperationError) ), movescount.com replied with " "" " Failed to upload log (err code: QNetworkReply::NetworkError(ProtocolInvalidOperationError) ), movescount.com replied with " "" " Movescount replied with ContentConflictError for move ' Running ' from 2019 - 7 - 1 Movescount replied with ContentConflictError for move ' Running ' from 2020 - 1 - 2
paddy-hack commented 3 years ago

For the record, the last move I managed to upload to Movescount using openambit was a move on 2021-04-10. Best as I can tell, that upload happened on 2021-04-11. An attempt to upload moves on 2021-04-17 failed.

marguslt commented 3 years ago

Movescount upload was probably disabled on 2021-04-14: few activities were still appearing in bigger Movescount groups like https://www.movescount.com/groups/group2318-Suunto_Ambit_family_users & https://www.movescount.com/groups/group8-Trail_Running as people kept using 3rd party sync services and Add Move form in Movescount. But there's nothing after 2021-04-14 and Add Move form returns 500 Internal Server Error now.

marguslt commented 3 years ago

Strange, apparently something has been changed again at some point and Movescount currently accepts new activities - https://www.movescount.com/groups/group8-Trail_Running#ctl00_topContent_MostActiveUsers1_LatestMovesSectionTitle

benedetto commented 3 years ago

@marguslt I can confirm - same over here. Let's see if it stays...