Openhab2 Weather binding not working

I’m struggling since quite a while with the weather binding.
I don’t see any errors in the openhab b4 (binding-weather1 - 1.9.0.b5) weather.cfg but I don’t manage to get it working. I tried several providers, webview , items. Always the same mess (see logs and weather.cfg below).
I don’t have any idea on wat screws here.

Rainer

Weather as webview kicks out a

HTTP ERROR 500
Problem accessing /weather. Reason:
Server Error
Caused by:
javax.servlet.ServletException: Weather locationId ‘homeHamWeather’ does not exist

Items using the weather bindings remain also NULL

KARAF log:

javax.servlet.ServletException: Weather locationId ‘homeHamWeather’ does not exist
at org.openhab.binding.weather.internal.gfx.WeatherServlet.doGet(WeatherServlet.java:102)[218:org.openhab.binding.weather:1.9.0.b5]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[19:javax.servlet-api:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[19:javax.servlet-api:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[79:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[79:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)[170:org.ops4j.pax.web.pax-web-jetty:4.3.0]

Weather binding is active

218 | Active | 80 | 1.9.0.b5 | openHAB Weather Binding
LOG during startup looks ok
19:48:13.305 [INFO ] [eather.internal.common.WeatherConfig] - ProviderConfig[providerName=HAMWEATHER,apiKey=,apiKey2=UFLV7MyQerVgk7cDCu8j2plegfUgm]
19:48:13.309 [INFO ] [eather.internal.common.WeatherConfig] - ProviderConfig[providerName=OPENWEATHERMAP,apiKey=10ca]
19:48:13.313 [INFO ] [eather.internal.common.WeatherConfig] - ProviderConfig[providerName=WUNDERGROUND,apiKey=b6a]
19:48:13.319 [INFO ] [eather.internal.common.WeatherConfig] - ProviderConfig[providerName=FORECASTIO,apiKey=69a676e1773d
]
19:48:13.324 [INFO ] [eather.internal.common.WeatherConfig] - LocationConfig[providerName=OPENWEATHERMAP,language=en,updateInterval=240,latitude=
,longitude=6.842528,woeid=,locationId=homeOWM,name=
_OpenWeatherMap]
19:48:13.326 [INFO ] [eather.internal.common.WeatherConfig] - LocationConfig[providerName=WUNDERGROUND,language=fr,updateInterval=30,latitude=,longitude=,woeid=,locationId=homeWU,name=
_WeatherUnderground]
19:48:13.329 [INFO ] [eather.internal.common.WeatherConfig] - LocationConfig[providerName=FORECASTIO,language=fr,updateInterval=10,latitude=,longitude=,woeid=,locationId=homeFIO,name=
_Forecast_IO]
19:48:13.331 [INFO ] [eather.internal.common.WeatherConfig] - LocationConfig[providerName=HAMWEATHER,language=en,updateInterval=240,latitude=
,longitude=*,woeid=,locationId=homeHamWeather,name=_HamWeather]

LATER IN THE LOG – DISABLES WEATHER BINDINGS !!! WHY ???

19:48:16.376 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Disabling weather locationId ‘homeWU’, no binding available
19:48:16.378 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Disabling weather locationId ‘homeFIO’, no binding available
19:48:16.380 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Disabling weather locationId ‘homeHamWeather’, no binding available


Weather.cfg

apikey.Hamweather=qjRavOspDGr0IW********
apikey2.Hamweather=gp8zoVxVAhdUFLV7MyQerVgk********
location.homeHamWeather.name=********
location.homeHamWeather.latitude=********
location.homeHamWeather.longitude=********
location.homeHamWeather.provider=Hamweather

apikey.Wunderground=********
location.homeWU.name=LesAdrets_WeatherUnderground
location.homeWU.latitude=********
location.homeWU.longitude=********
location.homeWU.provider=Wunderground

apikey.ForecastIo=********
location.homeFIO.name=_IO
location.homeFIO.latitude=43.524664
location.homeFIO.longitude=

location.homeFIO.provider=ForecastIo
location.homeFIO.language=fr
location.homeFIO.updateInterval=10

Delete your /var/lib/openhab2/config/org/openhab/weather.config and try with only 1 location in your /etc/openhab2/services/weather.cfg (fix .cfg, then delete .config)

Check also if you have listed the weather binding in your /etc/openhab2/services/addons.cfg : binding = weather1 (you need to add the 1)

Also, it wouldn’t hurt to uninstall the Weather binding and to re-install it… :slight_smile:

Example from my weather.cfg:

apikey.Wunderground=xyz
location.HomeR.name=HomeR
location.HomeR.latitude=44.x
location.HomeR.longitude=26.y
location.HomeR.provider=Wunderground
location.HomeR.language=en
location.HomeR.updateInterval=10

Test things out with 1, then add more step by step to see if everything works ok

Here is my weather.items file also:

Number	WU_Temp		"Temperature [%.2f °C]"		<temperature>	(Weather,gInflux)	{weather="locationId=HomeR, type=temperature, property=current"}
Number	WU_Humid	"Humidity [%d %%]"		<humidity>	(Weather)	{weather="locationId=HomeR, type=atmosphere, property=humidity"}
Number	WU_Press	"Pressure [%.2f mb]"		<humidity>	(Weather)	{weather="locationId=HomeR, type=atmosphere, property=pressure"}
String	WU_Cond		"Condition [%s]"		<sun_clouds>	(Weather)	{weather="locationId=HomeR, type=condition, property=text"}

Number	WU_Prec		"Precip Probability [%d %%]"	<water>		(Weather)	{weather="locationId=HomeR, type=precipitation, property=probability"}
DateTime	WU_LastUpdate	"Last update [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	<text>	(Weather)	{weather="locationId=HomeR, type=condition, property=lastUpdate"}
Number	WU_Rain		"Rain [%.2f mm/h]"	<water>	(Weather)	{weather="locationId=HomeR, type=precipitation, property=rain"}
Number	WU_Wind_S	"Windspeed [%.2f km/h]"	<wind>	(Weather)	{weather="locationId=HomeR, type=wind, property=speed"}
String	WU_Wind_D	"Wind direction [%s]"	<wind>	(Weather)	{weather="locationId=HomeR, type=wind, property=direction"}

DateTime	ObservationTime0	"Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{weather="locationId=HomeR, forecast=0, type=condition, property=observationTime"}
DateTime	ObservationTime1	"Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{weather="locationId=HomeR, forecast=1, type=condition, property=observationTime"}
DateTime	ObservationTime2	"Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{weather="locationId=HomeR, forecast=2, type=condition, property=observationTime"}

String	Condition0	"Condition [%s]"	(Weather)	{weather="locationId=HomeR, forecast=0, type=condition, property=text"}
String	Condition1	"Condition [%s]"	(Weather)	{weather="locationId=HomeR, forecast=1, type=condition, property=text"}
String	Condition2	"Condition [%s]"	(Weather)	{weather="locationId=HomeR, forecast=2, type=condition, property=text"}

Number	Precip_Probability0	"Precip probability [%d %%]"	{weather="locationId=HomeR, forecast=0, type=precipitation, property=probability"}
Number	Precip_Probability1	"Precip probability [%d %%]"	{weather="locationId=HomeR, forecast=1, type=precipitation, property=probability"}
Number	Precip_Probability2	"Precip probability [%d %%]"	{weather="locationId=HomeR, forecast=2, type=precipitation, property=probability"}

Number	Temp_Min0	"Temperature min [%.2f °C]"	{weather="locationId=HomeR, forecast=0, type=temperature, property=min"}
Number	Temp_Max0	"Temperature max [%.2f °C]"	{weather="locationId=HomeR, forecast=0, type=temperature, property=max"}
Number	Temp_Min1	"Temperature min [%.2f °C]"	{weather="locationId=HomeR, forecast=1, type=temperature, property=min"}
Number	Temp_Max1	"Temperature max [%.2f °C]"	{weather="locationId=HomeR, forecast=1, type=temperature, property=max"}
Number	Temp_Min2	"Temperature min [%.2f °C]"	{weather="locationId=HomeR, forecast=2, type=temperature, property=min"}
Number	Temp_Max2	"Temperature max [%.2f °C]"	{weather="locationId=HomeR, forecast=2, type=temperature, property=max"}

I tried it
removed everything but HamWeather cfg from weather.cfg
deleted weather.config
restarted opehab

→ STILL THE SAME ERRORS

I don’t know what could be wrong… Your configs look good…

I would try re-installing the binding and if this doesn’t work… upgrade openHAB 2 to the Stable Release (2.0.0)

I ran into the same problem. The error message “Disabling weather locationId ‘homeHamWeather’, no binding available” is not very good, can confuse you.
Solution is very easy. If you have no items configured related to the weather config, the binding will be disabled, because not needed :wink: Just configure one item and you will see, the binding works and is enabled automatically.

I have had a similar issue. Config looks find and also log message Weather locationId ‘xxx’ does not exist on openhab 2.1.
Uninstalling and reinstalling the weather binding did the trick for me. Thanks for the tip.