• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-Strava

Scheduled Pinned Locked Moved Health
activity trackerhealthstrava
138 Posts 34 Posters 205.4k Views 35 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    Lorenz
    last edited by Lorenz May 17, 2019, 12:39 PM May 17, 2019, 12:23 PM

    When i use the new development branch the api for profile switcher isn’t working anymore. (the notification from MMM-Remote to be exact)

    1 Reply Last reply Reply Quote 0
    • L Offline
      lavolp3 Module Developer
      last edited by lavolp3 May 28, 2019, 8:57 PM May 28, 2019, 8:56 PM

      Hi all, Hi @ianperrin

      I love hunting for segments and for that I would like to include some kind of “crown board” calculating golden, silver and bronze crowns for first, second and third places in segments.
      At a later stage I can imagine including more information, e.g. some kind of notification if you lose a first pace to someone else.
      However, it’s not easy to get these numbers via the API.

      So, to summarise: I need the count of podium places for segments in running and cycling. These can change over time! So need to be checked and counted regularly.

      For these I need all segments the athlete has competed in.

      My approach would be:
      Go through ALL activities, pick segment ID’s, combine these and search through each segment leaderboard for the athlete’s name.
      However, this would be a LOT of API calls. And these are limited to 600 in 15 min. With a few hundred activities these can be exceed easily.
      So the call would somehow need to be stretched and used not with every other call.

      Any other ideas or input for this idea?

      Thanks for every input, as always!

      How to troubleshoot modules
      MMM-soccer v2, MMM-AVStock

      1 Reply Last reply Reply Quote 0
      • L Offline
        lavolp3 Module Developer
        last edited by Jul 30, 2019, 7:37 AM

        Hi all, hi @ianperrin ,it’s me again.

        I’m coding a lot with this module trying to build a bigger version of it, and stumbled upon some odd thing. I have included some console logs and found that for some reason the socket notification “SET_CONFIG” is received twice when the module starts, leading to two api calls directly after another. I can only see one send in the browser console from MMM-Strava.js, but two notification receives in the npm logs. Can someone duplicate our even explain this odd behavior?
        Thanks!

        How to troubleshoot modules
        MMM-soccer v2, MMM-AVStock

        1 Reply Last reply Reply Quote 0
        • D Offline
          dnovacik
          last edited by Sep 6, 2019, 4:16 PM

          Don’t forget that Strava is switching to using refresh tokens from 15th October 2019 and won’t be supporting forever tokens anymore. I started writing a little Strava api library in js, currently with only 2 endpoints and going to add up more ofc.

          https://github.com/dnovacik/strava-minimal-api

          L 1 Reply Last reply Sep 6, 2019, 8:47 PM Reply Quote 0
          • L Offline
            lavolp3 Module Developer @dnovacik
            last edited by lavolp3 Sep 6, 2019, 9:23 PM Sep 6, 2019, 8:47 PM

            @dnovacik Well this module uses the strava-v3 nodejs library by unboundev.
            github link.
            I guess that is where the new token procedure should be implemented isn’t it?
            Care to take a look?

            How to troubleshoot modules
            MMM-soccer v2, MMM-AVStock

            I 1 Reply Last reply Sep 6, 2019, 10:02 PM Reply Quote 0
            • I Offline
              ianperrin @lavolp3
              last edited by Sep 6, 2019, 10:02 PM

              @dnovacik

              The develop branch for the module contains the changes to support the new authentication approach - I’ll merge that back into the master branch in the coming weeks so the module can continue to be used

              @lavolp3

              I extended the Strava-v3 package (see https://github.com/ianperrin/MMM-Strava/blob/develop/strava_api.js) to support the new authentication methods. I guess these could be incorporated into a pull request for the core package now that it is active again ;)

              "Live as if you were to die tomorrow. Learn as if you were to live forever." - Mahatma Gandhi

              1 Reply Last reply Reply Quote 0
              • D Offline
                dnovacik
                last edited by Sep 7, 2019, 5:58 AM

                @ianperrin gj then, can’t wait to try out the module!

                1 Reply Last reply Reply Quote 0
                • Z Offline
                  zolabus
                  last edited by Oct 19, 2019, 5:53 AM

                  I can’t use the module anymore
                  If I try to reauthorize i have this error

                  {“message”:“Bad Request”,“errors”:[{“resource”:“Authorize”,“field”:“scope”,“code”:“invalid”}]}

                  Any help please?
                  Thanks

                  I 1 Reply Last reply Oct 19, 2019, 12:27 PM Reply Quote 0
                  • I Offline
                    ianperrin @zolabus
                    last edited by Oct 19, 2019, 12:27 PM

                    @zolabus said in MMM-Strava:

                    I can’t use the module anymore
                    If I try to reauthorize i have this error

                    {“message”:“Bad Request”,“errors”:[{“resource”:“Authorize”,“field”:“scope”,“code”:“invalid”}]}

                    Any help please?
                    Thanks

                    @zolabus - I’ve just released version 2.0.0 of the plugin which is available via the Master branch. Can you try this version?

                    When updating please make sure you run npm install --production from the MMM-Strava directory.

                    If you continue to get these errors, please check the Authorization Callback Domain in your Strava API Settings (https://www.strava.com/settings/api) matches the IP address/URL used to access MagicMirror

                    "Live as if you were to die tomorrow. Learn as if you were to live forever." - Mahatma Gandhi

                    Z 1 Reply Last reply Oct 20, 2019, 8:40 AM Reply Quote 0
                    • Z Offline
                      zolabus @ianperrin
                      last edited by Oct 20, 2019, 8:40 AM

                      @ianperrin
                      Hi I updated the module
                      When I restart the Magic Mirror I receive this
                      MMM-Strava: “Received notification: SET_CONFIG”
                      MMM-Strava: “Legacy config in use for module_14_MMM-Strava”
                      MMM-Strava: “Getting data for module_14_MMM-Strava”
                      MMM-Strava: “Access token not found for module_14_MMM-Strava”

                      Z 1 Reply Last reply Oct 20, 2019, 8:53 AM Reply Quote 0
                      • 1
                      • 2
                      • 6
                      • 7
                      • 8
                      • 9
                      • 10
                      • 13
                      • 14
                      • 8 / 14
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy