Read the statement by Michael Teeuw here.
MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast
-
@sdetweil
When I try the code in the config.js I get this in the logs[29.08.2022 10:22.03.630] [LOG] [MMM-OpenWeatherMapForecast] 29-Aug-22 10:22 ** ERROR ** null
[29.08.2022 10:22.03.639] [LOG] [MMM-OpenWeatherForecast] 29-Aug-22 10:22 ** ERROR ** Error: Request failed with status code 401 -
@bassin12 said in MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast:
[29.08.2022 10:22.03.630] [LOG] [MMM-OpenWeatherMapForecast] 29-Aug-22 10:22 ** ERROR ** null
yes, bug in his code…
use the code I posted on page one to extend the error reporting
but it returns 401 as well…
-
Is there a solution for this error? Is it something I’ve done or something in the module code?
[MMM-OpenWeatherForecast] 12-Nov-22 23:49 ** ERROR ** Error: Request failed with status code 401
-
@DDE12 401 eror is unauthorized
so the apikey you are using has expired
-
@sdetweil
I setup the default weather module with OpenWeather and it is working with the key I have. I obtained the key a few days ago. Is it the same key for MMM-OpenWeatherForecast? -
@DDE12 no idea
the module says go here
https://home.openweathermap.org/users/sign_up
the default weather openWeathermap provide says
https://home.openweathermap.org/users/sign_inso it would seem the same key
the module uses this path
https://api.openweathermap.org/data/2.5/onecall?"the default module uses this
apiVersion: "2.5", apiBase: "https://api.openweathermap.org/data/" +apiVersion+"onecall?"so, they appear the same
-
@sdetweil
I put in a new key just to see but still have the same 401 error. When I installed the module I gotnpm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile added 4 packages, and audited 391 packages in 50s 1 package is looking for funding run `npm fund` for details 39 vulnerabilities (2 low, 15 moderate, 19 high, 3 critical) To address all issues, run: npm audit fix Run `npm audit` for details.I did not run audit fix. Is there something that I need to do with the install?
-
@DDE12 NEVER run audit fix…
i don’t know why the MMM-OpenWeatherForecast is failing ,
other than it says unauthorized. i would open an issue for the author. -
@DDE12 Could you share your config? Also be sure put your API key in quotes in the configuration. If you aren’t using quotes, this could be a reason why the module is giving you the 401 error
-
@j-e-f-f
I can, but I think I figured it out last night without changing anything in MM or the module. I initially signed up for the free account on OpenWeatherMap. Last night I signed up for the One Call by Call https://openweathermap.org/api and MMM-OpenWeatherForecast starting working. Before signing up, I tested my API in a browser at https://api.openweathermap.org/data/2.5/onecall?lat=someLatitude&lon=someLongitude&appid=secretAPI
and at https://api.openweathermap.org/data/3.0/onecall?lat=someLatitude&lon=someLongitude&appid=secretAPI
and both reported 401 error. After signing up, the module began working in MM. This does require a credit card and subscribers get 1000 free calls per day. Subscribers can set the maximum number of calls in their dashboard to prevent going over and getting charged. This doesn’t seem like it would be too much of a problem if users set the module’s config appropriately.I’m guessing that the module is trying to get data that is no longer free and some API’s are grandfathered ?? Or I misunderstood what type of account I needed from the start.
Where is the API address in the module’s code?
Let me know if I can provide further information.
-
If the Module doesn’t load the informations change ```
“https://api.openweathermap.org/data/3.0/onecall”to“https://api.openweathermap.org/data/3.0/onecall?”
an it should work! -
@DDE12 the API url is in the node_helper.js
we recently add a Parm to enable picking v3 of the API vs 2.5 (old free).
the add on modules need to do the same
-
Fantastic work! I was using the previous DarkSkyForecast version - easy shift to this one.
I’m trying to put the hourly data and daily data in the same “row” across using tiled view instead of 2 rows. I’m happy to edit the njk file (have tweaked a bit haven’t gotten it “just right” yet). Any ideas? I gather it’s something with the hourly and daily divs.
Is data available to get mm of precipitation in the hourly and daily blocks? It shows % chance - keen to add precipitation instead.
Thanks!!
-
@yk said in MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast:
Fantastic work! I was using the previous DarkSkyForecast version - easy shift to this one.
I’m trying to put the hourly data and daily data in the same “row” across using tiled view instead of 2 rows. I’m happy to edit the njk file (have tweaked a bit haven’t gotten it “just right” yet). Any ideas? I gather it’s something with the hourly and daily divs.
Is data available to get mm of precipitation in the hourly and daily blocks? It shows % chance - keen to add precipitation instead.
Thanks!!
Replying to my own post incase someone else wants a single row for 3 hours and 3 days. You’ll need to comment out lines 191, 309, 315, 318 in the njk file. This results in a single row readable left to right hours then days. It’s a useful view if you’re using a full width view.
-
So what’s the solution for the 401 error?
The key works in default weather module, but in this one it’s not.@sdetweil said in MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast:
@DDE12 NEVER run audit fix…
Can you elaborate why?
I for one don’t like seeing vulnerabilities and critical messages anywhere, and letting security flaws linger… -
@justbob audit fix forces changes, and many times drags in breaking changes that we can do nothing about.
we are not running a web site w hundreds of random users, and are not dragging in other page content with their scripts. we are calling apis…
so the risks for (y)our site is extremely small…
I don’t know the answer on openweathermap.
-
I am using MMM-DarkSkyForecast - everything was fine, but today the module is not loading anymore. Are there any changes or known issues? Do I have to swith to another module?
Thx, Chris
-
@chris1971 DarkSky is dead. You’ll have to switch. Apple bought 'em up and is shutting down the APIs.
-
Thanks for the Info. Hope that the switch to Open Weather will be smooth. Long time ago that I have modified something on the mirror…
-
there is a replacement API. same parns
just different urlwas posted here in the last few months.
no time to search right now
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
