A simple magic mirror module for displaying a map of the last activity.
-In order to run the module, you'll need to setup API access on your Strava account.
-You'll need to get your clientId, clientSecret, and initial refreshToken. Follow these instructions to get those values. -Scopes for the token should include: activity:read_all
-You'll need to get a Google Maps API key. Follow thesee instructions
-
If the module does not appear to work, check the console by running your MM with dev tools (npm start dev).
-
Note: The access token and refresh tokens are kept in a file in the directory above the module. This is for the case where you are running both of my Strava MM modules, they'll share the token data between them allowing them to stay in sync and avoid "Unauthorized" errors
{
module: "MMM-Strava-Last-Activity-Map",
position: "top_right",
config: {
stravaClientId: "[YOUR CLIENT ID]",
stravaClientSecret: "[YOUR CLIENT SECRET]",
stravaRefreshToken: "[YOUR REFRESH TOKEN]",
googleMapsApiKey: "[YOUR GOOGLE MAPS API KEY]",
mapTypeId: "roadmap",
styledMapType: "standard",
disableDefaultUI: true,
header: "Last Activity on Strava",
height: "300px",
width: "300px",
initialLoadDelay: 4250,
retryDelay: 2500,
updateInterval: 60 * 15 * 1000,
}
}
I will likely continue to update the module. When you see that an update is available:
- Open the command prompt and change to directory \MagicMirror\modules\MMM-Strava-Last-Activity-Map\
- Run command
git pull
- Restart the Magic Mirror