• 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
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-DarkSkyForecast - Yet ANOTHER weather module

Scheduled Pinned Locked Moved Utilities
334 Posts 67 Posters 635.9k Views 74 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.
  • J Offline
    j.e.f.f Project Sponsor Module Developer
    last edited by j.e.f.f Feb 28, 2021, 1:10 PM Nov 30, 2018, 2:12 PM

    Hi folks

    UPDATE 28-FEB-2021
    This module has been replaced with MMM-OpenWeatherForecast. Apple bought Dark Sky and decided to stop allowing free access to their weather API (Thanks Apple). OpenWeatherForecast does everything this module does plus a bunch of improvements you’ve all been asking for.

    UPDATE 9-Dec-2018
    I’ve updated this module to use the Nunjucks HTML templating system, which means as of verison 1.6, this module requires MagicMirror version 2.2.0 or later. If you are running on an older version of MagicMirror, then please use v1.5 of the module, which you can download here:

    https://github.com/jclarke0000/MMM-DarkSkyForecast/releases/tag/v1.5

    Instead of using git clone to get the module code, download the zip file from the link above and extract the contents of the ZIP file to your modules directory. This zip puts all of the files into a folder named MMM-DarkSkyForecast-1.5. I don’t know if it’s necessary to rename this directory to just MMM-DarkSkyForecast or if it will work as-is. Run npm install as normal in the directory to install all of the dependencies.

    END UPDATES

    I had been using my old weather module for quite some time, but now that Weather Underground no longer allows free API access, I’ve needed a replacement.

    The great news is that there are SO many weather modules available now, but given that each of them behaved a little differently, it would have taken a considerable amount of time to go through and evaluate each one to see if it suited my needs.

    I instead decided to use that time to write one that exactly matches my needs. I’ll admit it is quite possible that another weather module does everything mine does and perhaps more, but being the lazy ass that I am, I didn’t take the time to check :)

    If you find it useful, then here it is.

    [card:jclarke0000/MMM-DarkSkyForecast]

    It supports current conditions, hourly and daily forecasts and is highly configurable. It includes a handful of icon sets and even supports Dark Sky’s Skycons animated icon set.

    If you don’t already have one, you’ll need to get a Dark Sky API key from here:
    https://darksky.net/dev

    You’ll also need the latitude and longitude of the region for which you want to display weather conditions. You can find that here:
    https://www.latlong.net/

    Screenshot:
    0_1543586344458_forecast-layouts.png

    Included Icon sets
    0_1543586376325_iconsets.png

    This does not share any code with my old MMM-MyWeather module. This is a completely new module from scratch that is a bit more organized code-wise and outputs HTML markup better suited for multiple layouts.

    R J N 4 Replies Last reply Dec 2, 2018, 6:20 AM Reply Quote 5
    • ? Offline
      A Former User
      last edited by A Former User Nov 30, 2018, 3:51 PM Nov 30, 2018, 3:45 PM

      @j-e-f-f
      What a beautiful module! Thank you always.
      Anyway, is there any feature to broadcast weather via notification? (current weather & forecasts) If so, it will be great.

      I’m making another calendar module, and want to use forecast info.
      And, My another module WeatherBackground also is using current weather info for searching image. Could you add this feature? just periodical simple notifications with payload will be enough.

      J 1 Reply Last reply Nov 30, 2018, 8:34 PM Reply Quote 0
      • S Offline
        Smotx
        last edited by Smotx Nov 30, 2018, 7:54 PM Nov 30, 2018, 7:45 PM

        Beautifull but…

        On mine, 'Loading"…

        and no error on log:
        Module helper loaded: MMM-DarkSkyForecast
        …
        Connecting socket for: MMM-DarkSkyForecast
        ====================== Starting node_helper for module [MMM-DarkSkyForecast]
        …

        J 1 Reply Last reply Dec 2, 2018, 12:57 AM Reply Quote 0
        • J Offline
          j.e.f.f Project Sponsor Module Developer @Guest
          last edited by Nov 30, 2018, 8:34 PM

          @sean I think that’s doable. Should be a simple addition to the code. Will take a look this weekend.

          1 Reply Last reply Reply Quote 0
          • R Offline
            rudibarani Project Sponsor
            last edited by rudibarani Nov 30, 2018, 10:51 PM Nov 30, 2018, 10:17 PM

            So beautiful - thank you very much!!
            This is more than an adequate replacement for MyWeather. Great job!

            I’d like to bring forward three questions:

            • Does the module support the USER_PRESENCE notification to suspend / resume API calls? If not, it would be nice if you could consider that.

            • Could you please add an option for a"label_timeFormatSuffix"? It would be nice if the time could be displayed like “14h” if one uses the 24h format.

            • Could you please add an option to hide the icons above the table (umbrella and wind) to make it more compact, if needed?

            J 1 Reply Last reply Dec 1, 2018, 12:31 AM Reply Quote 0
            • J Offline
              j.e.f.f Project Sponsor Module Developer @rudibarani
              last edited by Dec 1, 2018, 12:31 AM

              @rudibarani

              @rudibarani said in MMM-DarkSkyForecast - Yet ANOTHER weather module:

              Does the module support the USER_PRESENCE notification to suspend / resume API calls?

              It doesn’t suspend API calls based on user presence. This is intentional. I don’t spend more than about 30 seconds looking at my mirror, so when I do, I want the information that appears to be immediately up to date. By default the module polls every ten minutes for data, so you don’t run the risk of exceeding the 1000 request limit per day, nor are you really burning up a lot of CPU cycles to do so.

              @rudibarani said in MMM-DarkSkyForecast - Yet ANOTHER weather module:

              Could you please add an option for a"label_timeFormatSuffix"?

              This is already possible. Look at the label_timeFormat parameter

              @rudibarani said in MMM-DarkSkyForecast - Yet ANOTHER weather module:

              Could you please add an option to hide the icons above the table (umbrella and wind) to make it more compact, if needed?

              I’ll add this in at some point, but you can do it now in your custom CSS. Just hide the div with the .header-row class, like so:

              .MMM-DarkSkyForecast .header-row {
                display: none;
              }
              
              R 1 Reply Last reply Dec 2, 2018, 12:46 AM Reply Quote 0
              • R Offline
                rudibarani Project Sponsor @j.e.f.f
                last edited by Dec 2, 2018, 12:46 AM

                Dear @j-e-f-f,
                thanks for the quick reply. Today, I tried to get my toes wet with JS coding and added an option to hide the column header icons from the forecast table or optionally show a header above the forecast table. It seems to work as expected and I have created a pull-request to give others access to the feature as well and maybe safe you some time.

                I also found a way to hide the vertical lines from the table via the custom.css file and now the module looks even better, if a fullscreen background image is used.

                J 1 Reply Last reply Dec 2, 2018, 2:22 AM Reply Quote 0
                • J Offline
                  j.e.f.f Project Sponsor Module Developer @Smotx
                  last edited by j.e.f.f Dec 2, 2018, 12:58 AM Dec 2, 2018, 12:57 AM

                  @smotx I fixed a bug with the summary display last night. Try doing a git pull in the MMM-DarkSkyForecast directory, then restart MagicMirror. See if that fixes it.

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    j.e.f.f Project Sponsor Module Developer @rudibarani
                    last edited by Dec 2, 2018, 2:22 AM

                    @rudibarani I merged your pull request, but then I did a bit of refactoring. I renamed the the parameter forecastTableHeaderText to forecastHeaderText, as it can be used in both the table and tiled views.

                    I also fixed up how the header is formatted. I’m now using an HTML5 header element and it has two classes: module-header so that it is formatted the same as all of the other module headers, and forecast-header if you want to target it specifically with CSS.

                    Lastly, this update enables notifications for other modules. The notification is called DARK_SKY_FORECAST_WEATHER_UPDATE and the payload is Dark Sky’s weather JSON object. For details see https://darksky.net/dev/docs.

                    R C 2 Replies Last reply Dec 2, 2018, 2:21 PM Reply Quote 0
                    • R Offline
                      RedNax Module Developer @j.e.f.f
                      last edited by Dec 2, 2018, 6:20 AM

                      @j-e-f-f :) This looks familiar… well done!

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 33
                      • 34
                      • 1 / 34
                      1 / 34
                      • First post
                        3/334
                        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