ianperrin / MMM-Strava

A MagicMirror Module for your Strava data.
https://forum.magicmirror.builders/topic/457/mmm-strava?_=1616840157932
MIT License
49 stars 15 forks source link

Support different activities for different athletes? #11

Closed skpy closed 4 years ago

skpy commented 7 years ago

I'd like to display one athlete's rides, and one athlete's runs. Each athlete only does one activity. When using the current support for multiple athletes, I tried something like this:

{
  module: 'MMM-Strava',
  position: 'bottom_right',
  config: {
    strava_id: ['1234567','567890'],
    access_token: [id_1, id_2],
    mode: 'table',
    activities: ['run', 'ride'],
    athlete_text: ['one', two'],
    auto_rotate: true,
    reloadInterval: 1800000,
    updateInterval: 30000,
    animationSpeed: 2500,
  }
},

This produces a chart in which "one" has zero rides, and "two" has zero runs. This isn't a big deal, but it would be nice(r) to support just the activities that each person does. No one likes to see a listing of "zero" for activities!

I'm trying to work around this by using two discrete MMM-Strava blocks, one for each athlete with just their activity listed. This worked in local Docker testing, but isn't working so well when deployed to a RPi Zero W: one rider's activities show up, and the other just says "Loading..." No obvious error messages are being reported by the Mirror.

ianperrin commented 4 years ago

Following the release of version 2.0.0, it should now be possible to add multiple instances of the module to the config file. This allows for tables/charts to be displayed for multiple athletes and for the activities to be configured on a per athlete basis.

Note: the strava_id config option has been deprecated and should be removed.