From my own recent experience, you have a copy of the previous config.js file but the modules cloned into the new system may not be the same as what was cloned into the old system.
Butch Kemper
From my own recent experience, you have a copy of the previous config.js file but the modules cloned into the new system may not be the same as what was cloned into the old system.
Butch Kemper
Problem solved. There are multiple MMM-OpenWeatherForecast repositories. The one I cloned for the new system was not the clone I was previously using. I changed to the module from Tom-Hirschberger/MMM-OpenWeatherForecast and everything began working as expected.
I apologize for my error.
Update: To prevent future issues, I have add a comment in config/config.js file on each module statement to remind me of the module repository location. The comment appears as: // github.com/Tom-Hirschberger/MMM-OpenWeatherForecast.
Butch Kemper
I had a MagicMirror that was running on Bullseye and I decided to upgrade to Bookworm. Note to self “Leave running systems alone”.
Bookworm runs, MM starts up, and the modules for Calendar and MMM-Fuel are working properly. However, the MMM-OpenWeatherForecast module does not display any information and this error message is in the MagicMirror-out.log:
** ERROR ** Error: Request failed with status code 401
There are no other error messages from OpenWeatherForecast.
Any hints would be appreciated.
Butch Kemper
@sdetweil I noticed this discretion between the Weather module documentation:
Butch
The configuration parameters I use are:
module "MMM-OpenWeatherForecase"
latitude and NOT lat
longitude and NOT lon
apikey and NOT apiKey <---- Notice the "K"
Some MM configuration keywords have abbreviations but not all. The module README file gives the values for the keywords.
Also, since your apikey has been revealed to the world, you should cancel the posted key and generate a new key. Always keep the apikey secret.
Butch
The api call daily threshold for billing is 1,000. The default setting is to update every 10 minutes and that equals to 144 daily calls.
Butch
The Api has changed and the old apikey no longer works. The old api, V2.5, provided data for free and the new api, V3.0, will charge for daily data access requests that exceed 1,000. The new api requires a credit card to bill for all requests exceeding 1,000 per day.
In addition to establishing a credit card on my account and generating a V3.0 key, I installed the MMM-OpenWeatherForecast module using these instructions:
Navigate into the MagicMirror modules directory.
Execute git clone https://github.com/Tom-Hirschberger/MMM-OpenWeatherForecast
Enter the new MMM-OpenWeatherForecast directory and execute npm install
The configuration instructions and other information is located in:
Butch
@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
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
@sdetweil I ran the fixuppm2 script and now MM starts when the System starts and pm2 now works.
I just need to figure out why the MM Calendar is not starting.
Thank you for your help.
Butch
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"