MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

MMM-Strava only shows achievements, nothing else?



  • 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
    
    


  • Have you any public activities in the connected strava account?



  • 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?



  • 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.
    

  • Module Developer

    @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.



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


  • Module Developer

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



  • 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 …



  • @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?



  • 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.


Log in to reply