MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-forecast-io -- Localized up to the minute weather

    Scheduled Pinned Locked Moved Utilities
    127 Posts 36 Posters 201.0k Views 38 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G Offline
      grantc66 @rak
      last edited by

      @rak There seems to be a small error in the script creating the graph:

      // Init chart.js
      this.chart = new Chart(ctx, {
        type: 'line',
        data: data,
        options: options
      });
      

      Throws an uncaught reference error. Unfortunately I know absolutely nothing about js, can you let me know how to fix it.

      Ta

      1 Reply Last reply Reply Quote 0
      • R Offline
        rak
        last edited by

        You had the plugin before?

        Have you done this after switching to my fork? It should install chart.js as a dependency.

        npm install
        

        I hope this solves your problem. Let me know.

        G 1 Reply Last reply Reply Quote 0
        • idoodlerI Offline
          idoodler Module Developer @paulocarrasco
          last edited by

          @paulocarrasco Thats an easy one:) You are missing an , after 'my api key'.

          Here is the correct config:

          {
                module: 'MMM-forecast-io',
                position: 'top_right',  // This can be any of the regions.
                config: {
                  // See 'Configuration options' for more information.
                  apiKey: 'my api key', // Dark Sky API key.
                  // Only required if geolocation doesn't work:
                  latitude:   37.1468,
                  longitude: -8.5846
                }
          },
          
          1 Reply Last reply Reply Quote 0
          • G Offline
            grantc66 @rak
            last edited by

            @rak Had the original working OK, tried to npm install chart.js in the MM root :(

            the npm install in the MMM-foecast.io directory fixed it. :)

            looks great, good work.

            thanks

            1 Reply Last reply Reply Quote 0
            • B Offline
              barnosch
              last edited by

              @rak
              Nice work. i just installed it and adjusted for fitting my mirror.

              Is it possible to shrink the height from the graph?
              or is it calculated from the width (400px) to keep its aspect ratio?

              1 Reply Last reply Reply Quote 0
              • R Offline
                rak
                last edited by

                Should be easy do adapt. I can check if the height is currently fixed or exposed in the config.js.

                1 Reply Last reply Reply Quote 0
                • B Offline
                  barnosch
                  last edited by barnosch

                  guess i found it in the

                  renderPrecipitationGraph: function ()
                  

                  and

                  renderSVGPrecipitationGraph: function ()
                  

                  both heights are calculated there.

                  var width = this.config.precipitationGraphWidth; 
                  var height = Math.round(width * 0.3); // 120 by default
                  

                  Played around with the setting, but it did not change anything. Don’t get it currently… mabye you have an idea?

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    barnosch
                    last edited by

                    seems not the correct place.
                    Even if comment out both lines with “height” it makes no difference…

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      dudej11
                      last edited by

                      Hey! Although this thread is a bit old, I’m wondering if I can get some assistance. I have my DarkSky API key correct, however the console of my Mirror is telling me that it refreshed the access token because it had expired. I checked the API panel, and it did indeed show that the API had been called, so my API key is correct. However, the weather module never loaded. Any suggestions?

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        barnosch
                        last edited by

                        Other moduls are showing?
                        Have you tried with the above example from idoodler?

                        Otherwise try to delete the folder again, pull it again and don’t forget to “npm install” in the just downloaded folder.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 6
                        • 7
                        • 8
                        • 9
                        • 10
                        • 11
                        • 12
                        • 13
                        • 8 / 13
                        • First post
                          Last post
                        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