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 257.5k 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.
    • I Offline
      ianperrin @zolabus
      last edited by

      @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 Reply Quote 0
      • Z Offline
        zolabus @ianperrin
        last edited by

        @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 Reply Quote 0
        • Z Offline
          zolabus @zolabus
          last edited by

          @ianperrin
          Issue resolved thanks

          1 Reply Last reply Reply Quote 1
          • M Offline
            MisterT
            last edited by

            Hi everybody,
            I posted in troubleshooting section but i don’t know if it’s visible. That’s why i post here. I don’t understand the step 2 and the step 5 in Tutorial about MMM-Strava. I have a ID and a secret but i don’t know what i write in case:

            APi Name
            Category
            Club
            WebSite
            Description
            and Callback domain

            In Website and Callback domain what i write?
            In callback domain, i put my IP to my magic mirror like 192.128.1.99:8080 but nothing happen

            Can anybody help me please?

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

              @MisterT

              When creating your Strava API Application in Step 2, the key value is the Authorisation Callback Domain. This needs to the IP address or domain name you use to access the MagicMirror otherwise subsequent steps will fail. So in your case it looks like you should use 192.128.1.99

              Once the API Application is created, add the module to your config.js file with the client_id and client_secret then restart the mirror.

              The module should then state Client id unauthorised and provide a link to the authorisation process. At which point you should be able to follow step 5

              Here’s two screenshots which might help:
              Strava API Settings

              Strava API id and secret

              "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
              • M Offline
                MisterT
                last edited by

                ok thanks ianperrin for your help
                Step 2 is ok because on magic mirror, i have the link on magic mirror : client unauthorized see /MMM-Strava/auth/

                but now in step 5, i make:
                in webpage, and magic mirror starting i put
                http://192.128.1.99:8080/MMM-Strava/Oauth/
                but nothing happen. The webpage says:
                host unreachable
                ERR_CONNECTION_REFUSED

                have you an idea?

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

                  @MisterT is it possible you’re typing in the wrong url. Try using
                  http://192.128.1.99:8080/MMM-Strava/auth/ or simply clicking the link displayed by the module on the mirror.

                  If that fails, are you able to access your mirror via http://192.128.1.99:8080/ ?

                  Finally, can you make sure you ran npm install --production in step 1 and restarted the mirror?

                  "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
                  • M Offline
                    MisterT
                    last edited by MisterT

                    hI @ianperrin
                    It Works !!!
                    Nice explanations.
                    My mistake is when i launched a webpage to write the url i stoped the MM by Ctrl+Q. Now with MM start and a webpage opened. Everything is alright

                    Thanks for your help

                    1 Reply Last reply Reply Quote 1
                    • M Offline
                      MisterT
                      last edited by

                      hI @ianperrin
                      I have another problem with MMM-Strava.
                      I use it with MMM-Pages and MMM-Pages indicator. When i place the module in the config.js MMM-Pages settings, the Rotation of MMM-Pages doesn’t work and i have a error on Magic mirror when i press CTRL+SHIFT+i.
                      See Thread below for mox explanations

                      MMM-Pages no rotate

                      Have you an idea?

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

                        @MisterT thanks for the report.

                        I don’t have any experience with MMM-Pages so will have to install it and take a look if I experience the same issues.

                        Have you any idea what might be causing it?

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

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

                          An updated BETA version of MMM-Strava is available which includes a chartType option to toggle between classic bar chart and a new radial histogram

                          Below is a sample config and screenshot - note the histogram will display in grayscale, colours can be achieved using custom.css

                          {
                          	module: "MMM-Strava",
                          	header: 'Strava Radial Chart',
                          	position: "top_right",
                          	config: {
                          		client_id: "xxxxx",
                          		client_secret: "xxxxx",
                          		mode: "chart",
                          		chartType: "radial",
                          		period: "ytd"
                          	}
                          },
                          

                          example-chart-radial.png

                          Please report any comments/issues here, or on github

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

                          W 1 Reply Last reply Reply Quote 1
                          • M Offline
                            MisterT @ianperrin
                            last edited by MisterT

                            @ianperrin thx for your reply, I’m the noob in .js but i tried to understand the problem and the report is about “toLowerCase”. In MMM-Strava.js, if i modify the three config lines witch contain the synthax “toLowercase”, the result on Magic Mirror is a rotation of MMM-Pages but a message “Undefined” for MMM-Strava

                                this.config.mode = this.config.mode.toLowerCase();
                                this.config.period = this.config.period.toLowerCase();
                                this.config.chartType = this.config.chartType.toLowerCase();
                            

                            hope these light explanations can help you :face_screaming_in_fear:

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

                              @MisterT can you post the modified versions of these lines which enabled MMM-pages to rotate, but caused the undefined error for MMM-Strava?

                              I’m also curious about the error you posted in the other thread as it seems to refer to a style sheet included by another module…

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

                              M 1 Reply Last reply Reply Quote 0
                              • M Offline
                                MisterT @ianperrin
                                last edited by

                                @ianperrin i don’t know what i write and the meaning but if i modified these 2 lines (i don’t have the third line), i have MM rotation but undefined on MMM-Strava

                                   this.config.mode = this.config.mode.toLowerCase().mode;
                                  this.config.period = this.config.period.toLowerCase().period;
                                

                                The other error in wallberry module is a css error but i don’t think that it’s the problem of rotation because MMM-pages works with this error

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

                                  @MisterT I’ve just pushed an update to the module which may have fixed it. Can you update the module and let me know how it works out?

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

                                  M 1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    MisterT @ianperrin
                                    last edited by

                                    @ianperrin, i update your module and…tada it works :thumbs_up: great job
                                    MMM-Pages rotate and MMM Strava is visible
                                    Everything is good now

                                    I also try your other update about radial chart vizualisation and it’s great. I tested with year to date for bike and run and its’awesome. Just 2 remark:

                                    • In my opinion the radial gaphic it’s just a little too big and the graphic overlaps the other module.
                                    • I think we need informations about custom css in order to display colors about kilometers like for exemple:
                                      less 10 km for running in a month : red color
                                      from 10 to 30 km for running in a month: orange color
                                      over 30 km for running in a month : green color

                                    see you next time

                                    I 2 Replies Last reply Reply Quote 0
                                    • I Offline
                                      ianperrin @MisterT
                                      last edited by

                                      @MisterT - Great to hear it’s working now 👍

                                      "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
                                      • I Offline
                                        ianperrin @MisterT
                                        last edited by

                                        @MisterT said in MMM-Strava:

                                        the radial gaphic it’s just a little too big and the graphic overlaps the other module.
                                        I’m working on making the chart size customisable - watch out for further updates

                                        I think we need informations about custom css in order to display colors about kilometers like for exemple:
                                        less 10 km for running in a month : red color
                                        from 10 to 30 km for running in a month: orange color
                                        over 30 km for running in a month : green color

                                        I like the idea of colouring the bars based on a target. Will think about this one.

                                        In the meantime, to customise the colours of each bar in the radial chart, add the following to the custom.css file in ~/MagicMirror/css.

                                        .MMM-Strava svg path.bar.interval-1 {
                                          fill: #67b7dc;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-2 {
                                          fill: #6794dc;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-3 {
                                          fill: #6771dc;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-4 {
                                          fill: #8067dc;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-5 {
                                          fill: #a367dc;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-6 {
                                          fill: #c767dc;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-7 {
                                          fill: #dc67ce;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-8 {
                                          fill: #dc67ab;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-9 {
                                          fill: #dc6788;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-10 {
                                          fill: #dc6967;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-11 {
                                          fill: #dc8c67;
                                        }
                                        
                                        .MMM-Strava svg path.bar.interval-12 {
                                          fill: #dcaf67;
                                        }
                                        

                                        Note: As the radial chart is in beta, the css classes may be subject to change.

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

                                        R 1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          mattx38
                                          last edited by mattx38

                                          This post is deleted!
                                          1 Reply Last reply Reply Quote 0
                                          • M Offline
                                            matt216
                                            last edited by

                                            Hi there. Icons. Recently updated my config to include ‘hike’ activity, and it does, but without the nice little icon beside (like the little shoe beside run activities, and bike beside cycle activities). In ‘chart’ mode. Any ideas?

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 7 / 7
                                            • 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