Read the statement by Michael Teeuw here.
MMM-OpenWeatherForecast
-
Howdy,
I am having trouble getting MMM-OpenWeatherForecast to run and have been working my way through the problems.
First problem was a typo of “apiKey” which caused this message to flood the .pm2/logs/MagicMirror-out.log. Problem solved by correctly spelling the variable name “apikey” - notice the subtle difference between the “K” and “k”.
[2024-10-03 10:22:54.732] [LOG] [MMM-OpenWeatherForecast] 3-Oct-24 10:22 ** ERROR ** No API key configured. Get an API key at https://darksky.net
Once the “apikey” spelling problem was solved, the next error arrived and the log file was flooded with thousands of this message:
code_[2024-10-03 12:09:29.002] [LOG] [MMM-OpenWeatherForecast] 3-Oct-24 12:09 ** ERROR ** Latitude and/or longitude not provided.
This error was caused by confusing documentation that made it appear the variables were “lat” and “lon” instead of “latitude” and “longitude”. Correcting the spelling eliminated the error messages.
The current problem is this message which is again flooding the pm2 error.log:
[2024-10-03 14:10:02.077] ^[[31m[ERROR]^[[39m ^[[31m[MMM-OpenWeatherForecast] 3-Oct-24 14:10 ** ERROR ** TypeError: fetch failed^[[39m
I need a hint of where to look or what to do. I sure it is not hard but just me overlooking something.
However,the three problems reveal that the Module contains an error that flood the log files with thousands of messages.
Here is the portion configuration file relative to the OpenWeatherForecast module:
module: "MMM-OpenWeatherForecast", position: "top_right", header: "Current Weather", config: { weatherProvider: "openweathermap", type: "hourly", units: "imperial", tempUnits: "imperial", roundTemp: true, timeFormat: 24, onlyTemp: false, appendLocationNameToHeader: true, showSun: true, fade: false, fadePoint: 1, colored: true, updateInterval: 900000, // 15 minutes, 900 seconds maxEntries: 10, degreeLabel: true, lang: "en", location: "Sachse,Texas", locationID: "4724564", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; latitude: 32.98579, longitude: -96.60234, apiVersion: "3.0", weatherEndpoint: "/onecall", apikey: "This is a 3.0 key" }
I am also confused about the updateInterval value. Previously in this module and in other modules, time intervals are given in milliseconds so 15 minutes is written as 900000.
Thank you for reading.
Butch
-
@butchkemper it seems that you are mixing configuration for the standard weather module and configuration for MMM-OpenWeatherForecast
-
@MarcLandis Thank you for the push in the right direction. I took the time to remove all the unused options and corrected the updateInterval. Now everything is back to working.
Now I will need to study the new options to see if I need to change anything.
Thanks again.
Butch
-
So after getting everything set up with the new version 3.0 at openweathermap.org
I turned on my mirror for the first time this morning and it displayed the weather
and so I went to openweathermap.org just to check how many calls I made it already had me down for 20 calls
am I missing something here -
@Ray how often is the module fetching the weather ?
-
@sdetweil In default the module calls the Api every 10 minutes.
-
@wishmaster270 thanks. i knew i could go look, asking poster to do the same.
-
@wishmaster270 yes I have mine set for 15
but that doesn’t explain why when I turn it on for the first time in the morning they already have 20 calls I don’t get that -
@sdetweil I have it set for 15 minutes
-
@Ray said in MMM-OpenWeatherForecast:
@wishmaster270 yes I have mine set for 15
but that doesn’t explain why when I turn it on for the first time in the morning they already have 20 calls I don’t get thatWhat means “turn it on”? Boot up the Pi or turn on the screen?