Read the statement by Michael Teeuw here.
MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast
-
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-OpenWeatherForecastIf 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:
-
Navigate into your MagicMirror
modules
folder and execute
git clone https://github.com/jclarke0000/MMM-OpenWeatherForecast.git
. -
Enter the new
MMM-OpenWeatherForecast
directory and executenpm install
.
NOTE
If you’re using a pre-release version, doinggit pull
won’t be enough to install the latest code. I replaced the deprecatedrequest
library withaxios
. So make sure you runnpm install
to get the latest dependencies. Optionally you may runnpm prune
to remove installation forrequest
.Configuration:
At a minimum you need to supply the following required configuration parameters:
apikey
latitude
longitude
apikey
needs to be specified as a String, whilelatitude
andlongitude
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. -
-
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?
-
@jenga Maybe you are having the same issue I am with incorrect current/hourly time & temperature conversion?
-
@j-e-f-f That looks REALLY tasty! Thank you for the great work!
-
@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-e-f-f As always, great work. 😉
-
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…
-
Thanks For this great job! 👍
-
@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-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 :astonished_face:
Using defaults, no changes made.