MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

    Utilities
    48
    206
    23351
    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
      j.e.f.f Project Sponsor Module Developer last edited by j.e.f.f

      Ever since Apple bought Dark Sky and announced that that would stop allowing free access to their API (Thanks Apple!), I’ve been meaning to write a replacement for MMM-DarkSky Forecast.

      Well I finally got off my lazy ass and wrote it. Link to code here:
      https://github.com/jclarke0000/MMM-OpenWeatherForecast

      MMM-OpenWeatherForecast.png

      If you’re already using MMM-DarkSkyForecast, this will look familiar to you. In fact I based MMM-OpenWeatherForecast on MMM-DarkSkyForecast’s code.

      But! Many improvements have been included. With this rewrite I have made it possible to display every bit of weather data provided in OpenWeather’s One Call API. Be sure to fully read the README.md file to see how you can configure this module exactly to your liking.

      Installation:

      1. Navigate into your MagicMirror modules folder and execute
        git clone https://github.com/jclarke0000/MMM-OpenWeatherForecast.git.

      2. Enter the new MMM-OpenWeatherForecast directory and execute npm install.

      NOTE
      If you’re using a pre-release version, doing git pull won’t be enough to install the latest code. I replaced the deprecated request library with axios. So make sure you run npm install to get the latest dependencies. Optionally you may run npm prune to remove installation for request.

      Configuration:

      At a minimum you need to supply the following required configuration parameters:

      • apikey
      • latitude
      • longitude

      apikey needs to be specified as a String, while latitude and longitude can be specified as either a String or a Number. Both work fine.

      e.g.,

        {
          module: "MMM-OpenWeatherForecast",
          position: "top_right",
          header: "Forecast",
          config: {
            apikey: "a1b2c3d4e5f6g7h8j9k0", //only string here
            latitude: 51.490230,            //number works here
            longitude: "-0.258810"          //so does a string
          }
        },
      

      You need to create a free account with OpenWeather in order to get an API key:
      https://home.openweathermap.org/users/sign_up.

      Free tier is fine – this module will not make anywhere near 60 calls per minute / 1,000,000 requests per month.

      Find out your latitude and longitude here:
      https://www.latlong.net/.

      Refer to the README for all of the other configuration options.

      NOTE
      This module uses the Nunjucks templating system and therefore requires MagicMirror version 2.2.0 or later.

      lavolp3 BKeyport cowboysdude ebolisa D 5 Replies Last reply Reply Quote 9
      • J
        jenga last edited by

        I am trying to adjust the hours under the hourly forecast to reflect a different time zone. I was reviewing the code and I see UTC references. How can I adjust this to CST?

        nitewing76 J 2 Replies Last reply Reply Quote 1
        • nitewing76
          nitewing76 @jenga last edited by

          @jenga Maybe you are having the same issue I am with incorrect current/hourly time & temperature conversion?

          1 Reply Last reply Reply Quote 2
          • lavolp3
            lavolp3 Module Developer @j.e.f.f last edited by

            @j-e-f-f That looks REALLY tasty! Thank you for the great work!

            How to troubleshoot modules
            MMM-soccer v2, MMM-AVStock

            swvalenti 1 Reply Last reply Reply Quote 1
            • swvalenti
              swvalenti Project Sponsor @lavolp3 last edited by

              @j-e-f-f Am I missing a way to turn off current weather alerts? Once a weather alert like high wind or snow it drops my tables down and throws other modules off.

              J 1 Reply Last reply Reply Quote 0
              • BKeyport
                BKeyport Module Developer @j.e.f.f last edited by

                @j-e-f-f As always, great work. 😉

                The "E" in "Javascript" stands for "Easy"

                1 Reply Last reply Reply Quote 0
                • cowboysdude
                  cowboysdude Module Developer @j.e.f.f last edited by

                  As of Saturday, May 1, 2021, the free Yahoo Weather API will be retired.

                  So as more time goes by the free weather api’s are dropping like flies…

                  M 1 Reply Last reply Reply Quote 1
                  • J
                    jms3700 Project Sponsor last edited by jms3700

                    Thanks For this great job! 👍

                    1 Reply Last reply Reply Quote 0
                    • M
                      MajorC Project Sponsor @cowboysdude last edited by

                      @cowboysdude it would be nice if someone with knowledge could have a look at the API of www.yr.no

                      The forecast is very good and they are providing free world wide data.

                      J cowboysdude 2 Replies Last reply Reply Quote 0
                      • ebolisa
                        ebolisa @j.e.f.f last edited by

                        @j-e-f-f Thanks for sharing.

                        Does it work on Pi Zero? In my case it doesn’t load. I just see FORCAST and then “Loading…” forever 😲
                        Using defaults, no changes made.

                        J 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 20
                        • 21
                        • 1 / 21
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy