Read the statement by Michael Teeuw here.
Default weather module stuck loading after latest MM update
-
I’ve just updated the MM to the latest version, everything seems to have gone fine except the default weather module, which is now stuck in a “loading” phase.
I found an older post saying the newer version of this module needed an APIkey over an APIid but the MM setup is newer than this post so already has this change.
Has anyone had this same issue since this latest update, or have any ideas how to sort this?
Seems I can’t even update the MM without causing an issue.
for completeness I got this at the bottom of the update using
git pull && npm run install-mm,npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: magicmirror@2.29.
npm ERR! notsup Not compatible with your version of node/npm: magicmirror@2.29.
npm ERR! notsup Required: {“node”:“>=20.9.0 <21 || 22”}
npm ERR! notsup Actual: {“npm”:“10.1.0”,“node”:“v20.8.0”}npm ERR! A complete log of this run can be found in: /home/MagicMirror/.npm/_los/2024-10-06T07_38_42_762Z-debug-0.log
would these errors cause the issue I’m seeing?
cheers. -
@Peter Found it in the documentation!
Note: Latitude and longitude are REQUIRED if weatherEndpoint is set to ‘/onecall’. The locationID and location options are ignored when the OpenWeatherMap One Call API is used.
https://docs.magicmirror.builders/modules/weather.html#configuration-options
-
npm ERR! notsup Required: {“node”:“>=20.9.0 <21 || 22”} npm ERR! notsup Actual: {“npm”:“10.1.0”,“node”:“v20.8.0”}mm needs a node version
v20orv22and minimum version isv20.9.0, you are runningv20.8.0 -
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:
- Read the instructions in the README.md file.
Butch
-
-
@karsten13 how do I update this specifically.
Everything was working fine prior to the latest MM update.
-
@butchkemper Is this the default weather module or an additional one?
-
@JMac if you had used my upgrade script, it would have upgraded node as well
see https://github.com/sdetweil/MagicMirror_scripts
you can use the upgrade again with the parameter of
forceinstead of
apply -
So I’ve run your update, and the weather still doesn’t load.
Seems odd that the API issue would only arise following the update.
Is this likely? -
@JMac the provider announced that the old 2.5 API would be sunset in June of this year… we didn’t get that update into the last version…
v3.0 is the ONLY one we provide default for…
starting with MM version 2.29
you MUST get a new v3 api key , which requires a credit card.
the 1st 1000 calls to the new api are currently not charged -
@sdetweil So I’ve upgraded to my account on OpenWeather (and added payment details.
Generated a new APIkey and added this to the config of the weather module but it is still stuck on loading. -
@JMac can you look at the messages from npm start
the ‘loading…’ message is just to have something on the screen until data arrives
and as such it didn’t arrive.
can u post the module config (xxx out your apiKey)
-
@sdetweil same problem here.
Upgraded my Openweather account, added paymentdetails (seemed to worked well), generated a new API key (how can I see it is a 3.0 key?)
Used your upgrade script, Sam.
Entered the new key in my config.
Everything works fine except the default weathermodule.
Peter -
This is my config, maybe somebody can tell me what is wrong?
{ module: "weather", position: "top_right", config: { weatherProvider: "openweathermap", type: "current", location: "Apeldoorn", locationID: "2759705", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "xxxxxxxxxxxxxxxxxxxxxx" } }, { module: "weather", position: "top_right", header: "Weersverwachting", config: { colored: true, weatherProvider: "openweathermap", type: "forecast", location: "Apeldoorn", locationID: "2759705", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "xxxxxxxxxxxxxxxxxx" } }, -
@Peter ok, two things…
you ALSO have to add
weatherEndpoint: "/onecall",to each config, as this is required for the 3.0 api
this makes it work with my 3.0 apikey

second,
in the forum, when you post config, or log info, please use the code block wrapper… else the quotes get changed to workd processing type which JS doesn’t understandto do
paste the text into the editor, blank line above and below
select the text just pasted
hit the </> button above the editor -
@sdetweil Thanks, You solve a 2 weeks headache problem wit this line:
weatherEndpoint: “/onecall”,
-
@sdetweil so my config was identical to above, so I’ve added you new line “weatherEndpoint…”
I’m using Putty to access the MM and used pm2 to stop the MM.
which it did.
However now, pm2 via Putty is no longer having any effect on the MM.
MM isn’t launching.run pm2 logs mm and get a parsing error over adding the new line
unexpected token weatherEndpoint your configuration file contains syntax errors.all I’ve added is weatherEndpoint: “/onecall”, to a final line under the apiKey line above.
any thoughts?
edit to add, pm2 status and logs show that pm2 exists still it’s just not launching. can pm2 be “updated” or should I follow the process for a first install?
for completeness I don’t want it to launch MM on boot I just want to be able to start and stop the MM using pm2. -
@JMac did u have the trailing comma
we added code to stop MagicMirror coming up with garbage profile on error
-
@sdetweil I have it exactly as you have it above.
can you share a config for this module as an example?
I can’t even check if this is working with pm2 not launching the MM -
cd ~/MagicMirror
npm start -
@sdetweil Adding ‘weatherEndpoint: “/onecall”,’’ gives some kind of weather, but for the wrong location I presume (26C but it is only 15C here).
So, location ID does not work with API 3.0; it worked with 2.5.
Somebody have the solution?
Lat/ Lon?Peter
-
> magicmirror@2.29.0 start > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js [2024-10-08 19:41:58.640] [LOG] Starting MagicMirror: v2.29.0 [2024-10-08 19:41:58.693] [LOG] Loading config ... [2024-10-08 19:41:58.698] [LOG] config template file not exists, no envsubst [2024-10-08 19:41:59.497] [INFO] Checking config file /home/MagicMirror/MagicMirror/config/config.js ... [2024-10-08 19:41:59.584] [ERROR] Your configuration file contains syntax errors :( Line 94 column 5: Parsing error: Unexpected token weatherEndpointThat parsing error is for the new line added in for weatherEndpoint
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login