Read the statement by Michael Teeuw here.
Problem with Weather forecast
-
Hello!
I have a problem with weather forecast.
He doesn’t appear on the screen, is there a manipulation to do ?
Thanks -
You’re not giving a lot of information here. Have you followed the instructions in the README?
-
Yes i have read everything, i have written the same information as for the current wheater module. But nothing appears…
-
Post your config here
-
{
module: “weatherforecast”,
position: “top_right”,config: {
location: “Saint-Germain-les-Corbeil,France”,
locationID: “2979752”, //ID from http://www.openweathermap.org/help/city_list.txt
appid: “ea0222cc89779d1aXXXXXXXXXXXXXXX”,
maxNumberOfDays: “4”
}},
-
@Aurelsam said in Problem with Weather forecast:
{
module: “weatherforecast”,
position: “top_right”,
config: {
location: “Saint-Germain-les-Corbeil,France”,
locationID: “2979752”, //ID from http://www.openweathermap.org/help/city_list.txt
appid: “ea0222cc89779d1aXXXXXXXXXXXXXXX”,
maxNumberOfDays: “4”
}
},This works for me. Check your appid.
{ module: "weatherforecast", position: "top_right", header: "Saint-Germain-les-Corbeil,France", config: { location: "", locationID: "2979752", //ID from http://www.openweathermap.org/help/city_list.txt appid: "ea0222cc89779d1aXXXXXXXXXXXXXXX", maxNumberOfDays: "4" } },
-
@Mykle1
My appid is good because it works with the current weather.
There are no other solutions?
Thx Mykle1 -
Copy and paste my config entry above into your config and DOUBLE CHECK your appid. That entry is working.
EDIT! Working under MM 2.1.1
-
I have the same problem, even after deep investigations.
I can get current weather calling this :
http://api.openweathermap.org/data/2.5/weather?q=paris&units=metric&APPID=cbbxxxxxxxxxxxxxxI can get forecast weather with 3h timepoints using
http://api.openweathermap.org/data/2.5/forecast?q=paris&units=metric&APPID=cbbxxxxxxxxxxxxxxBUT i cannot use daily forecast which is used by MM
http://api.openweathermap.org/data/2.5/forecast/daily?q=paris&units=metric&APPID=cbbxxxxxxxxxxxxxx
it returns : {“cod”:401, “message”: “Invalid API key. Please see http://openweathermap.org/faq#error401 for more info.”}it appears that daily forecast is not free (anymore ?) regarding openweather website.
https://openweathermap.org/priceMaybe it is a problem related to location ? I see that I actualy live just a few kilometers away from Aurelsam (Saint-Germain-les-Corbeil, France)
-
You can temporarly get around the problem by using 3h steps forecast (2nd link of my previous post) instead of daily, and by adding this to the weatherforecast.js :
in function processWeather,
after line var forecast = data.list[i];add:
if (forecast.dt_txt.split(" ")[1] != “00:00:00”) continue;
(in config)
maxNumberOfDays parameter now counts timepoints (each 3h) and not days:
maxNumberOfDays: 4 // means 4 forecast points: 0h, 3h, 6h, 9h
maxNumberOfDays: 8 // means 8 timepoints of 3h = 24h = 1 day
maxNumberOfDays: 40 // means 40 timepoints of 3h = 120h = 5 daysYou should also remove parameter check in the same script weatherforecast.js, which allow maximum 16 (for 16 days). it should be set to maximum 128 (timepoints) for 16 days.
example:
params += “&cnt=” + (((this.config.maxNumberOfDays < 1) || (this.config.maxNumberOfDays > 128)) ? 40 : this.config.maxNumberOfDays);