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 stopped updating

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    19 Posts 5 Posters 3.3k Views 5 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.
    • S Offline
      sdetweil @levon
      last edited by sdetweil

      @levon css/custom.css is because the file doesn’t exist by default…

      my installer creates an empty file, because many users don’t know how to create a file on linux…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      L 1 Reply Last reply Reply Quote 1
      • L Offline
        levon @sdetweil
        last edited by

        @sdetweil said in MMM-Strava stopped updating:

        @levon css/custom.css is because he file doesn’t exist by default…

        my installer creates an empty file, because many users don’t know how to create a file on linux…

        Ah, super helpful, I did

        touch custom.css
        

        in the css directory and those errors went away. Thanks! Now if I can only figure out the rest :)

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @levon
          last edited by

          @levon it appears the module doesn’t log much…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          karsten13K 1 Reply Last reply Reply Quote 1
          • karsten13K Offline
            karsten13 @sdetweil
            last edited by

            @sdetweil said in MMM-Strava stopped updating:

            it appears the module doesn’t log much…

            debug must be set in the config to get more logs …

            L 1 Reply Last reply Reply Quote 1
            • L Offline
              levon @karsten13
              last edited by levon

              @karsten13 Thanks … so I added “DEBUG” to this list, that should do it right?

              logLevel: ["INFO", "LOG", "WARN", "ERROR", "DEBUG"], // Add "DEBUG" for even more logging
              

              Doesn’t seem to show much more than before though, just LOG and INFO as before … I’ll read up to see if there’s something else I need to do to trace that module in the meantime.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @levon
                last edited by

                @levon said in MMM-Strava stopped updating:

                so I added “DEBUG” to this list, that should do it right?

                no… that is different… you will get a lot of calendar module debug

                for normal modules

                   config: {
                       debug: true, 
                   }
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                L 1 Reply Last reply Reply Quote 1
                • L Offline
                  levon @sdetweil
                  last edited by

                  @sdetweil Thanks for the info. I now get these additional informative messages, but it all looks right, though it doesn’t update the information.

                  10.08.2021 16:20.18.805] [LOG]   MMM-Strava: "Getting data for module_8_MMM-Strava"
                  [10.08.2021 16:20.18.819] [LOG]   MMM-Strava: "Getting athlete activities for module_8_MMM-Strava after 2021-01-01"
                  [10.08.2021 16:20.18.845] [INFO]  Checking git for module: MMM-Pollen
                  [10.08.2021 16:20.18.970] [INFO]  Checking git for module: MMM-MoonPhase
                  [10.08.2021 16:20.19.063] [INFO]  Checking git for module: MMM-Strava
                  [10.08.2021 16:20.19.644] [INFO]  Checking git for module: MMM-Remote-Control
                  [10.08.2021 16:20.20.433] [INFO]  Newsfeed-Fetcher: Broadcasting 24 items.
                  [10.08.2021 16:20.20.850] [INFO]  Newsfeed-Fetcher: Broadcasting 15 items.
                  [10.08.2021 16:20.21.204] [INFO]  Newsfeed-Fetcher: Broadcasting 27 items.
                  [10.08.2021 16:20.21.750] [INFO]  Newsfeed-Fetcher: Broadcasting 9 items.
                  [10.08.2021 16:20.22.632] [LOG]   MMM-Strava: "Summarising athlete activities for module_8_MMM-Strava"
                  [10.08.2021 16:20.22.925] [INFO]  Newsfeed-Fetcher: Broadcasting 100 items.
                  [10.08.2021 16:20.23.000] [INFO]  Newsfeed-Fetcher: Broadcasting 52 items.
                  [10.08.2021 16:25.20.708] [INFO]  Newsfeed-Fetcher: Broadcasting 24 items.
                  [10.08.2021 16:25.21.232] [INFO]  Newsfeed-Fetcher: Broadcasting 15 items.
                  [10.08.2021 16:25.22.021] [INFO]  Newsfeed-Fetcher: Broadcasting 26 items.
                  [10.08.2021 16:25.22.197] [INFO]  Newsfeed-Fetcher: Broadcasting 9 items.
                  [10.08.2021 16:25.23.983] [INFO]  Newsfeed-Fetcher: Broadcasting 100 items.
                  [10.08.2021 16:25.24.292] [INFO]  Newsfeed-Fetcher: Broadcasting 52 items.
                  [10.08.2021 16:30.18.841] [LOG]   MMM-Strava: "Getting data for module_8_MMM-Strava"
                  [10.08.2021 16:30.18.844] [LOG]   MMM-Strava: "Getting athlete activities for module_8_MMM-Strava after 2021-01-01"
                  [10.08.2021 16:30.20.841] [INFO]  Newsfeed-Fetcher: Broadcasting 24 items.
                  [10.08.2021 16:30.21.431] [INFO]  Newsfeed-Fetcher: Broadcasting 15 items.
                  [10.08.2021 16:30.21.558] [LOG]   MMM-Strava: "Summarising athlete activities for module_8_MMM-Strava"
                  

                  For instance here’s the output of a Python program that uses the same API/credentials

                  [16:21 991] $ python strava_info.py
                  Expired token ..
                  Retriving information from year 2021 and onward.
                  
                  .Done.
                  API requests/pages: 2   records read: 235
                  Saving to file "strava_activities_final.csv"
                  
                  Since 2021
                  ------------------------------------------------
                  # of runs : 136    total distance:  653.18 miles
                  # of walks:  97    total distance:  232.63 miles
                  # of other:   2    total distance:    3.62 miles
                  ------------------------------------------------
                  Total #   : 235    total distance:  889.44 miles
                  [16:21 992] $
                  

                  The MM module has been stuck for a few weeks with these values

                  2765f6ec-0ccc-42ae-97ac-6ba7c6ad65d5-image.png

                  mumblebajM 1 Reply Last reply Reply Quote 0
                  • mumblebajM Offline
                    mumblebaj Module Developer @levon
                    last edited by

                    @levon Hi. Apologies for the late replies. Time difference. Can you check when last the tokens.js file was touched? That file is updated every time it does a call out to get data. Else I would suggest maybe just doing a git pull and npm install in the MMM-Strava folder. From the above replies I can’t see anything else that could be going wrong though.

                    Check out my modules at: https://github.com/mumblebaj?tab=repositories
                    Check my blog-post: https://mumblebaj.xyz/
                    Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                    L 2 Replies Last reply Reply Quote 1
                    • L Offline
                      levon @mumblebaj
                      last edited by

                      @mumblebaj No apologies needed at all - I appreciate all the info/suggestions.

                      Looks like the file is up-to-date, though the file was last touched about 30 minutes ago, in the config file it says to be updated every 10 minutes, so perhaps that’s a bit odd?

                      pi@io:~/MagicMirror/modules/MMM-Strava $ ls -lrts
                      total 256
                       24 -rw-r--r--  1 pi pi  23415 Jun  3 07:09 README.md
                       16 -rw-r--r--  1 pi pi  15048 Jun  3 07:09 node_helper.js
                       12 -rw-r--r--  1 pi pi  12257 Jun  3 07:09 MMM-Strava.js
                        8 -rw-r--r--  1 pi pi   6408 Jun  3 07:09 MMM-Strava.css
                        4 -rw-r--r--  1 pi pi   1099 Jun  3 07:09 LICENSE
                        4 drwxr-xr-x  2 pi pi   4096 Jun  3 07:09 tests/
                        4 drwxr-xr-x  2 pi pi   4096 Jun  3 07:09 templates/
                        4 drwxr-xr-x  4 pi pi   4096 Jun  3 07:09 public/
                        4 -rw-r--r--  1 pi pi   1604 Jun  3 07:09 package.json
                        4 drwxr-xr-x  2 pi pi   4096 Jun  3 07:09 translations/
                        4 drwxr-xr-x 57 pi pi   4096 Jun  3 07:10 node_modules/
                      164 -rw-r--r--  1 pi pi 166945 Jul 28 14:02 package-lock.json
                        4 -rw-r--r--  1 pi pi   1034 Aug 11 15:40 tokens.json
                      
                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        levon @mumblebaj
                        last edited by

                        @mumblebaj Ok, so I did this:

                        pi@io:~/MagicMirror/modules/MMM-Strava $ git pull && npm install
                        From https://github.com/ianperrin/MMM-Strava
                         * [new branch]      dependabot/npm_and_yarn/path-parse-1.0.7 -> origin/dependabot/npm_and_yarn/path-parse-1.0.7
                        Already up to date.
                        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
                        npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
                        
                        added 380 packages from 277 contributors and audited 435 packages in 42s
                        
                        75 packages are looking for funding
                          run `npm fund` for details
                        
                        found 13 vulnerabilities (12 moderate, 1 high)
                          run `npm audit fix` to fix them, or `npm audit` for details
                        pi@io:~/MagicMirror/modules/MMM-Strava $
                        

                        I didn’t run any of the fixes, I looked at audit, but didn’t see anything that seemed related to Strava.

                        Should I be concerned that the package-lock.json time stamp is different from the other June 3 files when I initially installed this? In all other modules the file stamps have the same values.

                        The log seems to show this module working ok, trying to get data every 5 minutes (I made it shorter for testing) though the timestamp on the tokens.json file hasn’t changed from 15:40 today, now it’s over 2 hours since then.

                        pi@io:~/MagicMirror $ grep Strava nohup.out 
                        [11.08.2021 16:46.44.905] [LOG]   Check MagicMirror version for node helper 'MMM-Strava' - Minimum version: 2.2.0 - Current version: 2.16.0
                        [11.08.2021 16:46.44.910] [LOG]   Module helper loaded: MMM-Strava
                        [11.08.2021 16:46.45.936] [LOG]   Connecting socket for: MMM-Strava
                        [11.08.2021 16:46.45.937] [LOG]   Starting module helper: MMM-Strava
                        [11.08.2021 16:46.54.215] [LOG]   MMM-Strava: "Getting data for module_8_MMM-Strava"
                        [11.08.2021 16:46.54.227] [LOG]   MMM-Strava: "Getting athlete activities for module_8_MMM-Strava after 2021-01-01"
                        [11.08.2021 16:46.54.961] [INFO]  Checking git for module: MMM-Strava
                        [11.08.2021 16:46.58.455] [LOG]   MMM-Strava: "Summarising athlete activities for module_8_MMM-Strava"
                        [11.08.2021 16:51.54.275] [LOG]   MMM-Strava: "Getting data for module_8_MMM-Strava"
                        [11.08.2021 16:51.54.279] [LOG]   MMM-Strava: "Getting athlete activities for module_8_MMM-Strava after 2021-01-01"
                        [11.08.2021 16:51.55.648] [LOG]   MMM-Strava: "Summarising athlete activities for module_8_MMM-Strava"
                        

                        I think I’m going to try updating the Strava module again based on the instruction on their github page. If that doesn’t work, perhaps I’ll just try nuking that directory and reinstalling it from scratch.

                        I’m just puzzled it stopped working.

                        S mumblebajM 2 Replies Last reply Reply Quote 0
                        • S Offline
                          sdetweil @levon
                          last edited by

                          @levon npm install updates the package-lock.json file. ( its the record of what is installed under MM)

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          1 Reply Last reply Reply Quote 1
                          • mumblebajM Offline
                            mumblebaj Module Developer @levon
                            last edited by

                            @levon I think check if it is successfully hitting the API on Strava. Check https://www.strava.com/settings/api.

                            c19513f0-dcd4-4f9d-ade5-4699fbe644a8-image.png

                            Also check if the Authorization Callback Domain matches your MM IP.

                            Check out my modules at: https://github.com/mumblebaj?tab=repositories
                            Check my blog-post: https://mumblebaj.xyz/
                            Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                            L 1 Reply Last reply Reply Quote 1
                            • L Offline
                              levon @mumblebaj
                              last edited by

                              @mumblebaj Yes, it is doing that for sure, I had kept an eye on that.

                              I think I finally tracked down the problem, however I don’t understand why it broke. The problem is with one of the options in the config.js file. I had used mode “chart” successfully since early June (ie for almost 2 months) as it also gave me stats on walks too, but for some reason the updates stopped happening with this mode (rather than the default “table” mode)

                              a12a4857-dcfd-4639-a8a6-64f52bac54b8-image.png

                              If I comment out the mode, or explicitly specify the default mode of “table”, I get the correct stats for runs, but it ignores the walk (as documented, it will only do run, swim, ride in “table” mode)

                              3a5bc429-75c5-4674-94f3-4a5c23a7ab0d-image.png

                              4af8ff8d-3288-4263-9002-bfabc4c16e41-image.png

                              I think I will open an issue with this.

                              I appreciate all of your help/suggestions. Perhaps the code author can shed some light on this.

                              mumblebajM 1 Reply Last reply Reply Quote 0
                              • mumblebajM Offline
                                mumblebaj Module Developer @levon
                                last edited by mumblebaj

                                @levon Awesome. Glad you found the issue. The code uses the npm module strava-v3. It looks like the method used does not return walking.

                                Check out my modules at: https://github.com/mumblebaj?tab=repositories
                                Check my blog-post: https://mumblebaj.xyz/
                                Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                                L 1 Reply Last reply Reply Quote 1
                                • L Offline
                                  levon @mumblebaj
                                  last edited by

                                  @mumblebaj Thank again for your help and everyone else. I definitely learned more about the software and how everything is connected. I’m sure that will come in handy down the line.

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

                                    Hi all, sorry for the delayed response

                                    @levon looking at the screen shot of your stats from the python module, the total number of activities you have logged this year exceeds 200. Whilst the module will continue to work (making api calls and updating the tokens file) only the first 200 activities are summarised in the chart.

                                    There is an issue relating to this bug ion GitHub, but I’ve not had the time to delve deeper.

                                    To confirm, can you set the period to “recent” and confirm the latest activities are included in the chart?

                                    "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

                                    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 / 1
                                    • 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