Read the statement by Michael Teeuw here.
Weather not working
-
@KI6UVE currentweather and weatherforecast have been replaced by weather, with type:‘current’ or type:‘forecast’
-
I changed it from appid to apiKey and the other module names to just “weather”, but still just black space where it should be in MM. Did I miss anything else?
-
@KI6UVE looks like weather via openweathermap takes lat/lon, not location
i recommend reading the doc, linked to from the MM github page
-
@sdetweil
I read that doc and I changed weatherEndpoint to “/onecall” and put in the lat and lon variables, but now I get a parsing error: unexpected token “lat” -
@KI6UVE don’t change the endpoint, missing a comma on the line before?
-
@sdetweil
I took out the endpoint line and that fixed the parsing error, but still no weather. I rechecked my api key and it is correct. Any other ideas? Thanks!! -
@KI6UVE open the developers window, ctrl-shift-i, then select the console tab and put weath in the filter field
is this an openweather v 3 apikey, that u had to provide a credit card to get?
if so, add
apiVersion:'3.0',to the weather config section
-
@sdetweil
No luck. I noticed you used ‘ ‘ instead of “ “ for the ‘3.0’. I used “ “ for all my other variables, such as type: “forecast”. Is that correct?The doc file doesn’t have any notation for how the lat/Lon is presented. Should that read…lat: ‘33.3025’ or nothing as it would imply in the doc file, I.e., lat: 33.3025
-
@KI6UVE lat and lng are numbers, so no quotes. either type is ok as long as they match
-
@sdetweil
No luck with that. Should the apiVersion be in ‘ ‘ or raw? Is there a different weather app api that is easier to configure? -
@KI6UVE I just did this
{ module: "weather", position: "top_right", config: { weatherProvider: "openweathermap", type: "current", // location: "New York", // locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: ".....", lat:30.xxxxxx, lon:-97.xxxxxx } },and it worked (top right)

and the other used locationID… with my apiKey
-
if you open the developers window using the instructions i gave before, do you see any errors?
-
@sdetweil
Something must be wrong with my api key. I did not see the instructions for opening a developers window. Could you send again? -
-
S sdetweil referenced this topic on
-
That brought up module weather.js, Uncaught SyntaxError: unexpected token .
-
@KI6UVE what line number?
-
159
-
-
Used in the install script npm install-mm from the website instructions. nodejs version is 16.18.1
-
@KI6UVE hm… I think that is manual install …
my scripts (listed in alternative install section)
are here
https://github.com/sdetweil/MagicMirror_scriptsdid u ever edit the weather.js file?
if so, you can restore itcd ~/MagicMirror
git checkout modules/default/weather/weather.jswhat MM version are u running? 2.21 is current
cd ~/MagicMirror
grep version package.json
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