@lavolp3 - thanks and good spot. Currently rotation is only supported for table mode. I’ve pushed a fix to the develop branch to enforce this behaviour. Please use git pull to get and test the changes.
Read the statement by Michael Teeuw here.
Posts
-
RE: MMM-Strava
-
RE: MMM-NetworkScanner
@Arjan said in MMM-NetworkScanner:
Also I’m trying to get there some colour in . But nonmatter what I do, there is only white. What is wrong in my config?
As I’m away from my mirror at the moment, I can’t test your config, however, there may be an issue with the new color functionality introduced following a recent pull request.
Until I get chance to look at it, then if you want to color the icons for all offline devices in the same color (e.g. red), then again try adding this to the
custom.cssfile.MMM-NetworkScanner table tr.dimmed td i { color: #f00; }To color online devices, change
tr.dimmedtotr.bright
To color the text as well as the icon, remove the trailingtd i -
RE: MMM-NetworkScanner
@Arjan said in MMM-NetworkScanner:
Is there a way to only show devices if they are off-line.
Unfortunately, there’s not currently an option to hide online devices via the config. Feel free to raise a issue suggesting this enhancement via GitHub or even a Pull Request :winking_face:
However, there may be a way to do it using css. Devices which are online should be rendered in a table row (
tr) with the class ofbright, whilst offline devices will have the class ofdimmed.I’m away from my mirror right now, so the example below may not be quite right, but try adding the following to the
custom.css..MMM-NetworkScanner table tr.bright { display: none; } -
RE: MMM-Strava
@lavolp3 said in MMM-Strava:
@ianperrin Table mode doesn’t seem to rotate the actual data into monthly data for me. I have done a run of 6.4 km on Tuesday. But much more in Jan and Feb :-)
Can you confirm that?Hi @lavolp3 - can you post your config for the module and if possible the output from the log?
-
RE: MMM-Strava
@lavolp3 that makes sense, I understand your issue now. Good pick up and we’ll done for finding that solution. I’ll look to update the read me with notes for creating the application as well as authorising the modules.
In the meantime, let me know how the token refresh works, or if any other errors appear.
-
RE: MMM-Strava
-
RE: MMM-NetworkScanner
@AshDarko said in MMM-NetworkScanner:
Any ideas?
Difficult to say without more information. If you are able to reproduce the error, please share more details.
-
RE: MMM-NetworkScanner
@AshDarko said in MMM-NetworkScanner:
Just changed it to “devices:” and now it works… god knows why i had “device”… i dont know if this is in some code somewhere haha
Glad you got it sorted.
I think all the documentation and code uses devices, but if you spot otherwise, please raise an issue.
-
RE: [Help!] svg Graph in module MMM-Strava
@lavolp3 - no worries. I’ve created a branch to develop this feature. Take a look at https://github.com/ianperrin/MMM-Strava/tree/feature/progress_chart
Once you checkout the branch, add/use the following configuration with either the legacy
strava_idandaccess_tokenoptions, or the newclient_idandclient_secretoptions:{ module: "MMM-Strava", position: "top_right", header: "Progress Chart", config: { activities: ["ride"], period: "ytd", mode: "progress" }, },
I haven’t yet implement the animated path to show the progress against the goal. ;)
-
RE: MMM-Strava
@lavolp3 are you browsing to http://localhost:8080/MMM-Strava/auth/ and using the authorisation process there? If so, where is the bad request being displayed?
It should look something like this:

-
RE: [Help!] svg Graph in module MMM-Strava
@ianperrin said in [Help!] svg Graph in module MMM-Strava:
However, I’ve recently been implementing new authentication flow in the develop branch.
See https://forum.magicmirror.builders/topic/457/mmm-strava/37 for more details on the new beta version ;)
-
RE: MMM-Strava
@zerodegree79 , @Val07300, @ctatos (and others I may have missed).
A new (beta) version of the module with support for Strava’s new authentication flow is available.
Much of the code for the module has been re-written/re-factored and includes a number of changes to the original module including
- Support for multiple instances of the module
- The table and chart and now generated via templates (rather than javascript)
- A helper is included to simplify the initial authentication with Strava
chartmode now supports either therecentandytdvalues in theperiodoption- The stats displayed in
tablemode are configurable via thestatsoption - To support the new authentication flow, the
client_idandclient_secretmust be included in the config in place of the deprecatedstrava_idandaccess_tokenoptions. The legacy options can still be used, but will trigger an alert on the mirror when the module is loaded and it is recommended they are removed.
Please note - the module no longer supports multiple athlete id’s in one module instance. Multiple instances can be added to the config file to achieve similar results.
Notes for beta testers
This functionality is only available in the develop branch of the github repository at this time. Once any issues have been fixed, the master branch will be updated.
To test the refresh token functionality and the new authentication flow in the Magic Mirror, you need to update the module using the following steps:
- stop the Magic Mirror
- switch to the develop branch and install the new dependencies
cd ~/MagicMirror/modules/MMM-Strava git checkout develop && git pull npm install --production - edit the MMM-Strava configuration in config.js and
- remove
strava_idandaccess_tokenoptions - add
client_idandclient_secretoptions. The values for these options should be copied from the My API Application page in your Strava profile
- remove
- restart the Magic Mirror
When updated correctly, the module should display a Client id unauthorised message. The module can be authorised using the following steps:
- Browse to http://localhost:8080/MMM-Strava/auth/ on the Magic Mirror. This can be done remotely if you have setup the
ipWhitelistin the Magic Mirror - Select module and click Authorise
- If prompted, log in to Strava
- On the Strava Authorisation page, click Authorize
- Once the successful authorisation message appears, restart your Magic Mirror.
-
RE: [Help!] svg Graph in module MMM-Strava
@lavolp3 I found that the only way to create an SVG via the DOM was to use
document.createElementNS. There’s a helper function (poorly namedgetNode) in the current master branch which supports the creation of an SVG tag with attributes (e.g.getNode("svg", {width: 115, height: 68, class: 'chart'})However, I’ve recently been implementing new authentication flow in the develop branch. Alongside that, I’ve switched to using nunjucks templating. There’s quite a few changes, including the
chartmode now supporting theperiodoption (i.e.recent,ytd) and the ability to add multiple instances of the module to the mirror which could (should?) make implementing new views easier.My suggestion would be to add a new mode (
progress) to the module along with a new template (templates\MMM-Strava.progress.njk) and start from there.Let me know how you get on and I can assist where possible.
-
RE: MMM-Strava
Not as yet I’m afraid.
Hoping to work on it in the coming weeks - work and other commitments permitting.
PRs welcome from those who might have the know how 😉
-
RE: MMM-Strava
@ctatos could you send me a pm with details of the script and cron setup you are using?
-
RE: how to adjust brightness based on time on RPi3?
@lkthomas okay, a couple of things to check
- Have you installed the module and its dependencies as per the instructions
- Did you restart MM after installing and changing the
config.jsfile.
With the config above place at the end of
modulessection you should see the following lines in the log.MMM-ModuleScheduler is removing all scheduled jobs MMM-ModuleScheduler received CREATE_GLOBAL_SCHEDULE MMM-ModuleScheduler is creating a global schedule for all modules using "0 6 * * *" and "0 22 * * *" with dim level 20 MMM-ModuleScheduler has created the global schedule for all modules MMM-ModuleScheduler will next show all modules at Sun Jan 13 2019 06:00:00 GMT+0000 (UTC) MMM-ModuleScheduler will next dim all modules at Sat Jan 12 2019 22:00:00 GMT+0000 (UTC)Whilst testing, you could use the following config to toggle the brightness more frequently (i.e. every two minutes):
{ module: 'MMM-ModuleScheduler', config: { global_schedule: {from: '0-59/4 * * * *', to: '2-59/4 * * * *', dimLevel: '20' }, } },Let us know how you get on.
-
RE: how to adjust brightness based on time on RPi3?
@lkthomas take a look at MMM=ModuleScheduler. It contains a method for dimming modules.
Once installed, adding something like this should to your
config.jsshould work{ module: 'MMM-ModuleScheduler', config: { // SHOW ALL MODULES AT FULL BRIGHTNESS AT 06:00 AND DIM THEM TO 20% AT 22:00 global_schedule: {from: '0 6 * * *', to: '0 22 * * *', dimLevel: '20' }, } }, -
RE: MMM-NetworkScanner Icons
@zdenek the module currently only supports font awesome 4 so try
video-camera.Unfortunately,
raspberry-piis only available in font awesome 5 so you won’t be able to use it just yet. However, once the fix to an issue with font awesome compatibility has been released, which is expected in version 2.7, you should be able to use all font awesome 5 free icons -
RE: MMM-Strava
You should avoid editing the module files and place your configuration in the config.js file - check the readme file for installation, update and configuration notes
Once you’ve reverted your changes to the module files,
pullthe latest version of the module and make sureconfig.jsis correctly configured.There is no need to add anything special to the config to include
virtualactivities as these will be rolled up into therideandruntotals in the chart like the table mode and your dashboard on the Strava website