Weather binding error help[Solved]

Hi All,

I’m trying to make the weather binding work, but no joy so far.

I have checked the binding is running in the console, so all good there:

In the logs it is giving me this error

2017-02-19 19:03:13.662 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=326, bundle=207/mvn:org.openhab.binding/org.openhab.binding.weather/1.9.0]: Updating property weather of configuration org.openhab.weather caused a problem: Incomplete location config for locationId '<locationId1>'. Check openhab.cfg.
org.osgi.service.cm.ConfigurationException: weather : Incomplete location config for locationId '<locationId1>'. Check openhab.cfg.
        at org.openhab.binding.weather.internal.common.WeatherConfig.parse(WeatherConfig.java:97)[207:org.openhab.binding.weather:1.9.0]

Now I know this all looks pretty self explanatory, but as fas as I can tell I have no references remaining to

Here is my weather.cfg

############################## Weather Binding ##############################
#
# The apikey for the different weather providers, at least one must be specified
# Note: Hamweather requires two apikeys: client_id=apikey, client_secret=apikey2

#weather:apikey.ForecastIo=myapikey

weather:apikey.OpenWeatherMap=myapikey
#weather:apikey.WorldWeatherOnline=
#weather:apikey.Wunderground=
#weather:apikey.Hamweather=
#weather:apikey2.Hamweather=
#weather:apikey.Meteoblue=

# location configuration, you can specify multiple locations

weather:location.home_OWM.name=Home
weather:location.home_OWM.latitude=53.6462458
weather:location.home_OWM.longitude=-1.8125792
weather:location.home_OWM.provider=OpenWeatherMap
weather:location.home_OWM.updateInterval=1
weather:location.home_OWM.language=en
#weather:location.<locationId1>.units=
#weather:location.<locationId1>.woeid=      (required for Yahoo)



#weather:location.<locationId2>.name=
#weather:location.<locationId2>.latitude=   (not required for Yahoo)
#weather:location.<locationId2>.longitude=  (not required for Yahoo)
#weather:location.<locationId2>.woeid=      (required for Yahoo)
#weather:location.<locationId2>.provider=
#weather:location.<locationId2>.language=
#weather:location.<locationId2>.updateInterval=
#weather:location.<locationId2>.units=      (new in 1.10.0)

My items file looks like this

Number Temp "Temperature [%.1f °C]" {weather="locationId=home_OWM, type=temperature, property=current"}

And my sitemap like this

Text item=Temp

Anyone have any ideas

One reason could be that you did have a “location1ID” before and it is still in memory although you don’t have it in the setup file. Try to check with the Rest API if that is correct and remove unused weather items.

I’ve restarted openhab many times, wouldn’t that clear down the memory?

I’ve just looked in http://192.168.0.123:8080/rest/items

No reference there to “location1ID”

Any other ideas?

The logs say openhab.cfg, but all the docs pointed me to weather.Cfg. Is something wrong here?

I found odd config files as per this post, removing them fixed it. There is something screwy in openhab here.

1 Like

Does anyone have any idea what’s going on here. Can’t find anything in the docs

Thank you very much for that comment! Deleting the weather.cfg files from /var/lib/openhab2/config/org/openhab/ solved it for me!