Read the statement by Michael Teeuw here.
MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast
-
I’m having some problems and do not know exactly what is wrong, got this error:
[29.08.2022 09:51.32.701] [LOG] [MMM-OpenWeatherForecast] 29-Aug-22 09:51 ** ERROR ** Error: Request failed with status code 401
I get this on my screen
I did not do any configuration just using this as a Code:
{ module: "weather", position: "top_right", header: "Weather Forecast", config: { weatherProvider: "openweathermap", type: "forecast", location: "Suwanee", locationID: "4225309", apiKey: "MYKEY" } }, { module: "MMM-OpenWeatherForecast", position: "top_right", header: "Forecast", config: { apikey: "MYKEY", //only string here latitude: 51.490230, //number works here longitude: -0.258810, //so does a string } },
-
@bassin12 said in MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast:
I did not do any configuration just using this as a Code:
that is configuration (editing config.js)
I do not know… the error says the source returned a 401 error code
not my module… open an issue on the module github page… -
@bassin12 also the code block start (the 3 backtics) must be on the start of the line
I edited your post to fix that
-
my config , both work (and the default weather module in both current and forecast mode)
{ module: "MMM-OpenWeatherForecast", position: "top_right", header: "Wettervorschau Schama", config: { apikey: "xxxx", latitude: 49.039349, longitude: 11.847070, units:"metric", iconset: "4c", colored: true, concise: true } }, { module: "MMM-OpenWeatherMapForecast", header: "Weather", position: "top_left", classes: "default everyone", disabled: false, config: { apikey: "..", latitude: "51.506130", longitude: "-0.090270", iconset: "4c", concise: false, forecastLayout: "table" } },
-
@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