• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
  1. Home
  2. ianperrin
  3. Posts
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
I
Offline
  • Profile
  • Following 0
  • Followers 6
  • Topics 6
  • Posts 164
  • Groups 1

Posts

Recent Best Controversial
  • 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:
    0_1551273310262_Strava Authorisation.png

    posted in Health
    I
    ianperrin
    Feb 27, 2019, 1:00 PM
  • 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 ;)

    posted in Development
    I
    ianperrin
    Feb 27, 2019, 8:08 AM
  • 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
    • chart mode now supports either the recent and ytd values in the period option
    • The stats displayed in table mode are configurable via the stats option
    • To support the new authentication flow, the client_id and client_secret must be included in the config in place of the deprecated strava_id and access_token options. 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_id and access_token options
      • add client_id and client_secret options. The values for these options should be copied from the My API Application page in your Strava profile
    • 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 ipWhitelist in 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.
    posted in Health
    I
    ianperrin
    Feb 27, 2019, 8:07 AM
  • 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 named getNode) 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 chart mode now supporting the period option (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.

    posted in Development
    I
    ianperrin
    Feb 27, 2019, 7:41 AM
  • 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 😉

    posted in Health
    I
    ianperrin
    Feb 3, 2019, 8:50 PM
  • RE: MMM-Strava

    @ctatos could you send me a pm with details of the script and cron setup you are using?

    posted in Health
    I
    ianperrin
    Jan 15, 2019, 4:29 AM
  • RE: how to adjust brightness based on time on RPi3?

    @lkthomas okay, a couple of things to check

    1. Have you installed the module and its dependencies as per the instructions
    2. Did you restart MM after installing and changing the config.js file.

    With the config above place at the end of modules section 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.

    posted in Troubleshooting
    I
    ianperrin
    Jan 12, 2019, 5:20 PM
  • 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.js should 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' },
            }
        },
    posted in Troubleshooting
    I
    ianperrin
    Jan 12, 2019, 4:17 AM
  • RE: MMM-NetworkScanner Icons

    @zdenek the module currently only supports font awesome 4 so try video-camera.

    Unfortunately, raspberry-pi is 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

    posted in Troubleshooting
    I
    ianperrin
    Jan 12, 2019, 3:58 AM
  • RE: MMM-Strava

    @zerodegree79

    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, pull the latest version of the module and make sure config.js is correctly configured.

    There is no need to add anything special to the config to include virtual activities as these will be rolled up into the ride and run totals in the chart like the table mode and your dashboard on the Strava website

    posted in Health
    I
    ianperrin
    Nov 28, 2018, 7:46 PM
  • 1 / 1
Enjoying MagicMirror? Please consider a donation!
MagicMirror created by Michael Teeuw.
Forum managed by Sam, technical setup by Karsten.
This forum is using NodeBB as its core | Contributors
Contact | Privacy Policy