Read the statement by Michael Teeuw here.
Struggling with Weather... module
-
hi all
been trying for a while to get the default “weather” app to work for me and im struggling a little bit, NPM syntax check comes back clean.
im 95% sure i have all the relevant info in the config.js file.
But im not seeing weather output on screen.
Figured i’d put it here instead of Discord.
All suggestions warmly recieved
-
This “issue” is fixed.
Advised by Sam, I ran these 2 commands to find modified files that differ from a “clean install/default” of MM.
git status git diff
Any that varied… I ran:
git checkout <dir-tree>/file.extension
Rebuilt my config.js and found that apiBase HAS to be commented out.
On reflection DO NOT CHANGE ANY FILE aside from “config.js”
I had 3 causes for this issue.- (edit) i had longitude set in config.js to “long:”… it should be “lon:” and the lat/lon do not have to be surrounded by any quote marks.
- I’d modified other *.js files, that didn’t need to be modified.
- the “apiBase” argument listed in (MagicMirror Documentation > Modules > Weather Module > Configuration Options) was, in my case, not “REQUIRED”.
@sdetweil … Sam, publically, I cant thank you enough for your help with this. Sorry for being a n00b, your insight and help was invaluable, and you taught me some stuff, which is great!!
-
@D3dl3g cool… can u show the messages at runtime
where you do npm start, or if using pm2, then the command
pm2 logs --lines=???
will show the output
??? is a number, default 15, but may need to be higher to see the output…
you can do pm2 flush to empty the log and then start again (pm2 restart all)
-
@D3dl3g as a first check, you can use my working config-entry and extend it one by one with your needs:
//################################################################################# { disabled: false, module: "weather", position: "top_right", header: "Wetter aktuell", config: { type: "current", location: "Bonn", locationID: "2946447", apiKey: "myKey", showWindDirectionAsArrow: true, showHumidity: true, showFeelsLike: false } }, //#################################################################################
Just replace the apikey.
-
@thgmirror nice, but he is trying a different provider.
-
@sdetweil I know, but to have a first sense of achievement he will see something different than “LOADING”
-
@thgmirror yes, but his API key is to a different service…
-
-
@thgmirror I’d gladly try, but I’d need an API key, my friend.
without an API for that particular weather service, it will just come up with “loading” as the server will not give the info to you.i saw the post of yours earlier, but as it didnt match my issue with UK Met Office weather service.
-
@sdetweil said in Struggling with Weather... module:
you can do pm2 flush to empty the log and then start again (pm2 restart all)
-
@D3dl3g if you get a free api key from openweathermap and then you can test with a known weather api that we all know works. (openweathermap works for me ). then you’ll narrow down the possibilities of why your particular setup isn’t working. 1) if it is the way you have installed the module, or 2) if the problem is with the weather endpoint you are trying to use. 3) maybe the uk weather api isn’t availble to you if you aren’t physically in the uk, 4) something else…
but getting the module working first in a known working configuration… will narrow down a lot of possibilities. it doesn’t mean that you can’t use the api you want later (unless that’s the issue).