josecastroleon / pimatic-openweather

Pimatic Plugin that retrieves the forecast on several devices
GNU General Public License v2.0
2 stars 9 forks source link

Error: Not found city (404) #21

Closed pimagical closed 9 years ago

pimagical commented 9 years ago

Since yesterday I'm not having weather information updates in Amsterdam.

I'm using the same source pimatic-openweather uses also for another device causing the same problems. So it's not the pimatic-openweather plugin having the problem, it's the source. This issue message is for explanation.

error [pimatic-openweather]: Error: Not found city (404)

mwittig commented 9 years ago

@pimagical Seems, like openweathermap has introduced some inconsistency with recent API changes.

I tried with location "Amsterdam, Netherlands" which worked fine with the WeatherDevice but resulted in the 404 error with the ForecastDevice. Then I tried with location "Amsterdam, NL" and, surprisingly, this works fine for both devices! Hope, this helps.

mwittig commented 9 years ago

According to the openweather API a location is specified by city name and the country code (ISO 3166). See http://openweathermap.org/current#name. I'll will make note in the README.

pimagical commented 9 years ago

Thanks this solves my problem!