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 - 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.

      posted in Health
      I
      ianperrin
    • 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.css file

      .MMM-NetworkScanner table tr.dimmed td i {
        color: #f00;
      }
      

      To color online devices, change tr.dimmed to tr.bright
      To color the text as well as the icon, remove the trailing td i

      posted in Utilities
      I
      ianperrin
    • 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 of bright, whilst offline devices will have the class of dimmed.

      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;
      }
      
      posted in Utilities
      I
      ianperrin
    • 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?

      posted in Health
      I
      ianperrin
    • 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.

      posted in Health
      I
      ianperrin
    • RE: MMM-NetworkScanner

      Thanks @Bob, I’ve updated the URLs in the ReadMe file

      posted in Utilities
      I
      ianperrin
    • RE: MMM-Strava

      @lavolp3 I’ve updated the comment above with clearer notes for beta testers.

      Everything you need should be done from the Magic Mirror, so if you can follow these steps again and let me know where the error occurs or your experience differs that would be great.

      posted in Health
      I
      ianperrin
    • 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.

      posted in Utilities
      I
      ianperrin
    • 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.

      posted in Utilities
      I
      ianperrin
    • 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_id and access_token options, or the new client_id and client_secret options:

      		{
      			module: "MMM-Strava",
      			position: "top_right",
      			header: "Progress Chart",
      			config: {
      				activities: ["ride"],
      				period: "ytd",
      				mode: "progress"
      			},
      		},
      

      Progress Chart.png

      I haven’t yet implement the animated path to show the progress against the goal. ;)

      posted in Development
      I
      ianperrin
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 1
    • 2
    • 3
    • 4
    • 5
    • 8
    • 9
    • 3 / 9