Read the statement by Michael Teeuw here.
Struggling with Weather... module
-
@D3dl3g I don’t KNOW for sure… the provider has its own apiBase set…
* apiBase: "https://api-metoffice.apiconnect.ibmcloud.com/metoffice/production/v0/forecasts/point/",so comment that out in your config
add // to the start of the line with apiBase:also, as this doesn’t have a node helper, we should be looking in the browser logs
ctrl-shift-i, select the console tab and put
weathin the filter field
-
@kayakbabe
For some reason i glossed over your reply, apologies.Trying with a different provider will be my plan of attack today. After running some diag, as sam has suggested.
I find the met office to be insanely accurate for my area when compared to other online weather services. Hence my desire to use it.
One of the reasons my posts are peppered with pictures and code is to help ensure i am setting it up correctly. I didnt realise about the .js in the weather folder for 2 days i thought it was all set up from config.js…
As it stands im convinced i have it set right, now, but its totally possible i have a comma in the wrong place. As im a total n00b with JS. i know sometimes it is difficult to see the forest through the trees and a fresh set of eyes can help.
Thank-you for your reply, looks like im experiencing option 4 😄
-
apiBase commented out in config.

server restart, and browser log request, showing loaded weather modules

i still have “loading” in module locationlooking at source gives me the impression that i need to go and look at 2 more .js files. Previously i have been working with /default/weather/ukmetofficedatahub.js and /MagicMirror/config/config.js
ill see if thes hold any info:
/root/MagicMirror/modules/default/weather/weatherproviders.js
(Edit: //weather provider properties: null, modified to:
)/root/MagicMirror/modules/default/weather/weather.js
(Edit: this file is set to “openweathermap”, changing to “ukmetofficedatahub”
)server restart, no effect noted :(
-
-
@D3dl3g you ONLY setup from config.js
please try with NO apibase set
-
weather.js and weatherprovider.js i have set back to defaults.
i have set config.js as requested
weatherProvider: 'ukmetofficedatahub', lat: "52.###############", long: "-1.###############", //apiBase: 'https://api-metoffice.apiconnect.ibmcloud.com/v0/forecasts/point/daily/', apiKey: 'e52#############################', apiSecret: 'd3a#############################',the result:-

-
@D3dl3g send me your API key… config from config.js via email or direct message so I can debug
did u look in the browser messages?
my email is my same userid at gmail
-
Just to update the forum, as to what happened behind closed doors
Sam kindly tested my code, and it worked for him.
I am recieving browser errors (previously requested but i wasnt looking in the right bit of the browser window)… he is not
Issues Tab

Console Tab

the last 5 entries here will reoccur, im guessing at every “retry” for weather infoattempted to use
useCorsProxy: trueto no availSam kindly posted into git hub issues.
https://github.com/MichMich/MagicMirror/issues/271 -
tested
ukmetofficehuband it works out of the box (without setting theuseCorsProxyflag).Looking into the provided config
weatherProvider: 'ukmetofficedatahub', lat: "52.###############", long: "-1.###############",which is messed up. It has to be:
weatherProvider: 'ukmetofficedatahub', lat: 52.###############, lon: -1.###############, -
@karsten13 I tested w those in quotes, and it worked ok
-
did only test without, but there is another error
lonvs.long… -
@karsten13 I just copy pasted and it worked.
weird
-
i too am getting this… showing me some 80+miles SEE of my actual location
-
@karsten13
also… replace the hash symbols with various numbers… im not posting my exact Lat/Long for obvious reasons…make sure ur doing
lat:and
lon:i had it set to lat & lon(G) which is incorrect. hence why it was 80+miles, way tf over there!
quote marks or none surronding the numbers doesnt appear to matter, for me at least
-
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 diffAny that varied… I ran:
git checkout <dir-tree>/file.extensionRebuilt 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 glad u got it working. we are all noobs at some of this stuff…
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

