How To Update Magic Mirror To Latest Version
MagicMirror Module: MMM-Strava
A MagicMirror Module for displaying your Strava data.
Example
The module displays activity information in one of two modes
-
tablemode, which displays a tabular array showing the number of activities, the total distance and (for contempoperiodsimply) the number of achievements. -
chartmode, which displays the total distance, moving time and height gain aslope a chart showing the full distance grouped by- day (for
recentperiod), - month (for
ytdperiod), - year (for
allmenstruum).
- day (for
In addition you tin can configure the following options
- Which
activities(and the order activities) should be displayed. - Which
statsshould be displayed.- The number of activities (
count). - The total distance (
distance). - The total elevation gain (
elevation). - The full moving time for the flow. (
moving_time). - The total elapsed fourth dimension for the menses. (
elapsed_time). - The full number of achievements (
achievements) - intablemode, only available forrecentcatamenia).
- The number of activities (
- Which
menstruumto display stats for your activities:- "recent" - concluding 4 weeks in
tabular arraymode or electric current week inchartmode. - "ytd" - current year to date.
- "all" - all fourth dimension.
- "recent" - concluding 4 weeks in
- Which
chartTypeshould be used inchartfashion:- "bar" - a simple bar chart.
- "radial" - a radial histogram
.
- The
firstYearto group activities by inchartfashion when theperiodis "all". - Whether the module should
auto_rotatethrough the different periods, and theupdateIntervalbetween rotations. (only applicable intablemode). - The
units(miles/anxiety or kilometres/metres) used to display the full distance and top gain statistics. - The
localeused for determining the engagement (day or month) labels innautical chartmode and number format in both modes. - The number of decimal
digitsdisplayed for the total distance and elevation gain statistics.
Installation
-
Stop your MagicMirror and clone the repository into the modules folder
cd ~/MagicMirror/modules git clone https://github.com/ianperrin/MMM-Strava.git cd ~/MagicMirror/modules/MMM-Strava npm install --production
-
Create a Strava API Application and note the
client_idandclient_secret- Browse to your My API Awarding page and log in to Strava if prompted.
- Brand certain the callback domain matches the IP accost (or URL) used to admission the MagicMirror.
- Make a note of the
client_idandclient_secret
-
Add the module to the config file (
~/MagicMirror/config/config.js) for your mirror.modules: [ { module: "MMM-Strava" , position: "top_right" , config: { client_id: "your_strava_client_id" , client_secret: "your_strava_api_client_secret" } } ] ;
The full listing of config options tin exist constitute in the configuration options table.
-
Restart the MagicMirror
-
Authenticate the module to allow access to the Strava API.
- Browse to the Strava authentication page: http://localhost:8080/MMM-Strava/auth/ - the exact URL may vary depending on your configuration.
- Select the module you wish to authenticate (east.g.
module_4_MMM-Strava) and click/tap Authorise -The number of the modules will vary depending on your configuration. - On the Strava Authority page, select the level of access you wish to give to the Magic Mirror, and click/tap Qualify - the module requires at least
View information nigh your public profileandView information about your activitiesbut information technology's up to you whether you desire to let access toindividual activities. - Once the successful authorisation message appears, restart your Magic Mirror.
Updating the module
To update the module to the latest version,
-
Pull the changes from this repository into the MMM-Strava folder:
cd ~/MagicMirror/modules/MMM-Strava git pull npm install --product
-
Update your config file to remove the
strava_idandaccess_tokenoptions and add the newclient_idandclient_secretoptions - See steps two and 4 in the installation notes.
Please Note Following the changes to Strava'southward authentication model, the client_id and client_secret must be included in the config in identify of the deprecated strava_id and access_token options.
If y'all haven't changed the module, this should work without whatever issues. If y'all take a problem, yous can reset the module using git reset --difficult, after which git pull should exist possible. You lot may wish to use git status to see whatever changes before doing and then.
Configuration options
The following properties tin be added to the configuration:
| Pick | Default | Description | Possible Values |
|---|---|---|---|
client_id | Required - The Client ID for your Strava API Awarding, obtained from your My API Application folio. | ||
client_secret | Required - The Client Secret for your Strava API Application, obtained from your My API Awarding page. | ||
manner | table | Optional - Determines which manner should be used to brandish activeness information. | "tabular array", "chart" |
chartType | bar | Optional - Determines the blazon of chert which should be displayed in chart. | "bar", "radial" |
activities | ["ride", "run", "swim"] | Optional - Determines which activities to display and in which club they are displayed. Note: - The activities can exist listed in any social club, and but one is required. However, they must exist entered as an array of strings i.e. comma separated values within foursquare brackets. | In table mode: "ride", "run", "swim" In chart manner: "alpineski", "backcountryski", "canoeing", "crossfit", "ebikeride", "elliptical", "golf", "handcycle", "hike", "iceskate", "inlineskate", "kayaking", "kitesurf", "nordicski", "ride", "rockclimbing", "rollerski", "rowing", "run", "canvas", "skateboard", "snowboard", "snowshoe", "soccer", "stairstepper", "standuppaddling", "surfing", "swim", "velomobile", "virtualride", "virtualrun", "walk", "weighttraining", "wheelchair", "windsurf", "workout", "yoga" |
period | recent | Optional - What menstruum should exist used to summarise the activities in table and chart mode. | contempo = final iv weeks in table fashion or electric current week in chart mode, ytd = year to engagement, all = all time |
stats | In table style: ["count", "distance", "achievements"] In nautical chart mode: ["distance", "moving_time", "meridian"] | Optional - Determines which statistics to display. Note: - The stats can be listed in any order, and only one is required. However, they must be entered as an array of strings i.eastward. comma separated values within square brackets. | "count", "altitude", "elevation", "moving_time", "elapsed_time", "achievements" |
auto_rotate | faux | Optional - Whether the summary of activities should rotate through the different periods in table mode. | true = rotates the summary through the different periods, faux = displays the specified period only. |
units | config.units | Optional - What units to use. Specified by config.js | config.units = Specified past config.js, metric = Kilometres/Metres, royal = Miles/Feet |
updateInterval | 10000 (10 seconds) | Optional - How ofttimes does the period have to change? (Milliseconds). | 1000 - 86400000 |
reloadInterval | 300000 (five minutes) | Optional - How ofttimes does the data needs to be reloaded from the API? (Milliseconds). See Strava documentation for API rate limits | 7500 - 86400000 |
animationSpeed | 2500 | Optional - The speed of the update animation. (Milliseconds) | 0 - 5000 |
locale | config.linguistic communication | Optional - The locale to be used for displaying dates - east.thousand. the days of the week or months or the year in chart mode. If omitted, the config.language will be used. | eastward.g. en, en-gb, fr etc |
debug | imitation | Optional - Outputs extended logging to the panel/log | truthful = enables extended logging, false = disables extended logging |
digits | 1 | Optional - Digits for total altitude and elevation gain statistics | 0 - ... |
firstYear | 5 years before the electric current date. | Optional - The commencement year activities should be grouped by in nautical chart fashion when the catamenia is "all". | 0 - ... |
Source: https://github.com/ianperrin/MMM-Strava
Posted by: cavendercoluseld.blogspot.com

0 Response to "How To Update Magic Mirror To Latest Version"
Post a Comment