• 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 only shows achievements, nothing else?

Scheduled Pinned Locked Moved Troubleshooting
16 Posts 4 Posters 2.6k Views 4 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.
  • N Offline
    nakulbende
    last edited by Jun 25, 2020, 1:45 PM

    Hey all,

    I installed MMM-Strava, followed the wonderfuly documented instructions on how to get authentication tokens - but am having some issues. I think my authentication is fine, because the module shows my weekly achievements. But, it does not show ride #, distances or any other stats. Here is my config file and screenshot:

    7edffdb2-87bd-4bdc-9ea7-497dbf54a948-image.png

    {
    	module: "MMM-Strava",
    	position: "bottom_left",
    	config: {
    		client_id: "XXXX",
    		client_secret: "XXXXXXX",
    		mode: "table",
    		activities: "ride",
    		reloadInterval: 1000*60*30,
    		stats: ["count", "distance", "elevation", "moving_time", "achievements"]
    	}
    }
    

    Here is the relevant output from npm start

    > magicmirror@2.11.0 start /home/pi/MagicMirror
    > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
    
    [2020-06-25 09:31:12.157] [LOG]    Starting MagicMirror: v2.11.0
    [2020-06-25 09:31:12.191] [LOG]    Loading config ...
    [2020-06-25 09:31:12.210] [LOG]    Loading module helpers ...
    
    [2020-06-25 09:31:20.444] [LOG]    Initializing new module helper ...
    [2020-06-25 09:31:20.446] [LOG]    Check MagicMirror version for node helper 'MMM-Strava' - Minimum version:  2.2.0 - Current version: 2.11.0
    [2020-06-25 09:31:20.448] [LOG]    Version is ok!
    [2020-06-25 09:31:20.450] [LOG]    Module helper loaded: MMM-Strava
    
    [2020-06-25 09:31:22.042] [LOG]    Connecting socket for: MMM-Strava
    [2020-06-25 09:31:22.044] [LOG]    Starting module helper: MMM-Strava
    
    
    1 Reply Last reply Reply Quote 0
    • K Offline
      karsten13
      last edited by Jun 25, 2020, 8:19 PM

      Have you any public activities in the connected strava account?

      1 Reply Last reply Reply Quote 0
      • N Offline
        nakulbende
        last edited by Jun 26, 2020, 12:19 AM

        Whoops, didn’t realize this just pulls from public profile - since it is taking authorization. I made some activities public - do i have to make it public?

        1 Reply Last reply Reply Quote 0
        • K Offline
          karsten13
          last edited by Jun 26, 2020, 7:33 AM

          Problem of strava api https://developers.strava.com/docs/reference/#api-Athletes-getStats

          Get Athlete Stats (getStats)
          
          Returns the activity stats of an athlete. Only includes data from activities set to Everyone visibilty.
          
          L 1 Reply Last reply Jun 26, 2020, 7:57 AM Reply Quote 0
          • L Offline
            lavolp3 Module Developer @karsten13
            last edited by lavolp3 Jun 26, 2020, 7:58 AM Jun 26, 2020, 7:57 AM

            @karsten13 @nakulbende The Strava API is becoming more and more useless on several endpoints.
            You have to think about it. With this endpoint, you can only draw YOUR OWN data (the data of the authenticated athlete), not of any other athlete, but it does NOT include private data.
            Does not make any sense at all.

            I’m still working on a bigger Strava module (which takes some more time after I needed to amend to further destructive API changes).
            The data could also be gathered from the “getActivities” endpoint, which includes private activities. Maybe the stats need to be created from that in future.
            This API call is however not included in MMM-Strava.

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

            1 Reply Last reply Reply Quote 0
            • K Offline
              karsten13
              last edited by Jun 26, 2020, 8:02 AM

              did already a PR for this for MMM-Strava, but still not merged: https://github.com/ianperrin/MMM-Strava/pull/38

              L 1 Reply Last reply Jun 26, 2020, 8:32 AM Reply Quote 0
              • L Offline
                lavolp3 Module Developer @karsten13
                last edited by Jun 26, 2020, 8:32 AM

                @karsten13 Great contribution!
                I might need to “borrow” some of that for my module :-)

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

                1 Reply Last reply Reply Quote 0
                • K Offline
                  karsten13
                  last edited by Jun 26, 2020, 7:35 PM

                  IMO this PR is only a workaround of a missing strava api function, I think they use it internally on their website, but they dont publish it … the workaround to calculate on your own is slow, loading my > #680 activities needs 20 sec. But I’m no js expert, may you can speed things up …

                  1 Reply Last reply Reply Quote 0
                  • N Offline
                    nakulbende
                    last edited by Jun 26, 2020, 8:07 PM

                    @karsten13 and @lavolp3 Thanks both of you for your contributions!!

                    I know strava is having issues, and is pushing a lot pf services to paid customers only. I dont mind not being able to see any other athletes, I mostly use it for my own tracking, and so I just keep it private. I do know that the random changes in their API caused a lot of trouble for you guys.

                    So - is there a way to checkout the PR - and use private activities? Can I use something like git checkout pr 38 and it will be the version @karsten13 PRed?

                    L 1 Reply Last reply Jun 26, 2020, 11:52 PM Reply Quote 0
                    • K Offline
                      karsten13
                      last edited by Jun 26, 2020, 8:16 PM

                      you have to use my fork of MMM-Strava.
                      First goto your modules folder and remove the current MMM-Strava subfolder (or rename it).
                      Then in your modules folder execute git clone -b stats_incl_private_acts https://github.com/khassel/MMM-Strava.git.
                      You can use your current config in your config.js and add showprivatestats: true to use this new feature.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        2/16
                        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