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 223.1k 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.
    • lavolp3L Offline
      lavolp3 Module Developer @hattlegr
      last edited by

      @hattlegr said in MMM-Strava:

      I am not sure where to get a valid “web address” and “call back domain “ from to complete the API Application on the strava site To obtain my client ID and client secret numbers

      On your personal Strava API website (strava.com/settings/api), you need to set a “callback domain” for your project. What did you set?

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

      H 1 Reply Last reply Reply Quote 0
      • H Offline
        hattlegr @lavolp3
        last edited by

        @lavolp3 I am not sure how to setup a call back domain.

        lavolp3L 1 Reply Last reply Reply Quote 0
        • lavolp3L Offline
          lavolp3 Module Developer @hattlegr
          last edited by

          @hattlegr You need to create an application in your strava account to use this module. Have you done that?

          1. Go to www.strava.com/settings/api
          2. Create an application. As far as I understand the only really important value is the callback domain. I GUESS (!!) this would need to be http://localhost OR the hostname (or IP) of your magicmirror, something like http://magicmirror
          3. Then you get a client secret and access token, which you need for the further procedure.

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

          I 1 Reply Last reply Reply Quote 0
          • I Offline
            ianperrin @lavolp3
            last edited by ianperrin

            @lavolp3 said in MMM-Strava:

            @hattlegr You need to create an application in your strava account to use this module. Have you done that?

            1. Go to www.strava.com/settings/api
            2. Create an application. As far as I understand the only really important value is the callback domain. I GUESS (!!) this would need to be http://localhost OR the hostname (or IP) of your magicmirror, something like http://magicmirror
            3. Then you get a client secret and access token, which you need for the further procedure.

            The easiest way to authorise the module is

            1. On the My API Application page update the application by entering localhost as the callback domain.

            2. Once the Strava API application is updated, copy the client id and client secret from the same page, then use these to update the module configuration in the config.js file and restart the Magic Mirror.

            3. Finally, on the Pi itself, browse to http://localhost:8080/MMM-Strava/auth/ and follow the steps.

            If it helps, here are the settings I’ve been using to test the module:

            Strava-API-Application-Settings.png

            Strava-API-Application-Client-Details.png

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

            H 1 Reply Last reply Reply Quote 0
            • H Offline
              hattlegr @ianperrin
              last edited by

              @ianperrin The description above is very good and I have successfully got through this process.

              I have added my new Client ID and Client-secret to the config file.
              When I run my magicmirror I am asked to follow link to strava/auth.
              I am able to select the module and click the authorize button. This brings me to an the authorize page with the three check boxes as described, when I click on the authorize button it brings me to the Stava login page. I am able to login, but the screen takes me to my dashboard page. with no home / back / close buttons. (it replaces the MM page). So I can’t get out of this stage.

              Out of interest, I tried opening a browser using localhost:8080 once MM is running and get the same screen. When I click on the authorize button in the browser environment the process works fine and I am eventually taken back to the MM page and the strava data is working. However, when I shut down and star again the authorization is forgotten.

              I 1 Reply Last reply Reply Quote 0
              • I Offline
                ianperrin @hattlegr
                last edited by

                @hattlegr okay so we’re making progress. What is the output in the log file or the debug console in the browser? Once you’ve authorised the module, was a tokens.json file created in the MMM-Strava module folder?

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

                H 1 Reply Last reply Reply Quote 0
                • H Offline
                  hattlegr @ianperrin
                  last edited by

                  @ianperrin No, there is no file called tokens.json

                  I 1 Reply Last reply Reply Quote 0
                  • I Offline
                    ianperrin @hattlegr
                    last edited by

                    @hattlegr how about the logs or debug console?

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

                    H 2 Replies Last reply Reply Quote 0
                    • H Offline
                      hattlegr @ianperrin
                      last edited by

                      @ianperrin Sorry, I can’t find any logs or sure what a debug console is.

                      I 1 Reply Last reply Reply Quote 0
                      • I Offline
                        ianperrin @hattlegr
                        last edited by

                        @hattlegr okay, so the Magic Mirror creates logs in two places.

                        1. On the Pi itself. If you use pm2 to start your mirror, these can be viewed by running pm2 logs mm

                        2. In the browser console. These can be viewed in the browser’s Developer Tools (usually activated by CTRL-SHIFT-i).

                        Let us know what you find.

                        "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
                        • 1
                        • 2
                        • 5
                        • 6
                        • 7
                        • 8
                        • 9
                        • 13
                        • 14
                        • 7 / 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