Weather Binding: Incomplete location config

I’ve been trying to get the weather binding to work, but have been unable to get it to work with any type of config I throw at it. This is my current config for ForecastIo and I’m not quite sure why it doesn’t work.

I’m using OpenHAB 2.0-SNAPSHOT.

Errors:

2016-09-02 07:38:37.305 [WARN ] [eather.internal.common.WeatherConfig] - Incomplete location config for locationId '<locationId1>'. Check openhab.cfg.
2016-09-02 07:38:37.308 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=330, bundle=208/mvn:org.openhab.binding/org.openhab.binding.weather/1.9.0-SNAPSHOT]: 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)[208:org.openhab.binding.weather:1.9.0.201608310111]
	at org.openhab.binding.weather.internal.bus.WeatherBinding.updated(WeatherBinding.java:82)[208:org.openhab.binding.weather:1.9.0.201608310111]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]

Config(services/weather.cfg):

apikey.ForecastIo=b9702cxxxxxcb91b4c30ec48exxxxxxx
#apikey.OpenWeatherMap=
#apikey.WorldWeatherOnline=
#apikey.Wunderground=
#apikey.Hamweather=
#apikey2.Hamweather=
#apikey.Meteoblue=

# location configuration, you can specify multiple locations
location.home.name=Home
location.home.provider=ForecastIo
location.home.language=en
location.home.updateInterval=10
location.home.latitude=33.8665
location.home.longitude=-84.3383

#location.<locationId2>.name=
#location.<locationId2>.latitude=   (not required for Yahoo provider)
#location.<locationId2>.longitude=  (not required for Yahoo provider)
#location.<locationId2>.woeid=      (required for Yahoo provider)
#location.<locationId2>.provider=
#location.<locationId2>.language=
#location.<locationId2>.updateInterval=

First, you have to put “weather:” in front of every entry in the cfg (api key and location configuration), just like it is described in the wiki:

https://github.com/openhab/openhab/wiki/Weather-Binding

Just like this:

weather:apikey.ForecastIo=b9702cxxxxxcb91b4c30ec48exxxxxxx

Second, the log referres to a “locationId1” which normally is the demo entry in the cfg file. Just make sure that there aren’t any entries left with this id (as “home” is your actual id).

Third (if everything above doesn’t solve your problem), try using another locationID. I’ve had similar problems and somewhere around here in the forum someone told me that the id “home” is some kind of reserved for the yahoo provider. I just changed my ID to home2 and everything worked. I would suggest only to try this if the other corrections don’t get a working binding.

Ah, wait a second: I have just seen you are using OH2. My hints are related to an OH1 installation, so no guarantee that this is valid for OH2.

Hey Stefan,

Thanks for the ideas. Sadly none of those ideas worked. I do agree with you that it’s quite weird for the <locationId1> to be in the error log. It looks like OpenHAB2 is reading a demo configuration file instead of the one in the services folder. I think I might report this as a bug.

Hi ChromoX

I too can’t seem to get the weather binding working on OpenHAB 2.0=SNAPHOT.

Here’s my setup:

/services/weather.cfg:

# The apikey for the different weather providers, at least one must be specified
# Note: Hamweather requires two apikeys: client_id=apikey, client_secret=apikey2
#apikey.ForecastIo=
#apikey.OpenWeatherMap=
#apikey.WorldWeatherOnline=
weather:apikey.Wunderground=7xxxc80xxx588xxx
#apikey.Hamweather=
#apikey2.Hamweather=

# location configuration, you can specify multiple locations
weather:location.myhome.name=My House
weather:location.myhome.latitude=-34.10413
weather:location.myhome.longitude=-18.36039
weather:locationd.myhome.provider=Wunderground
weather:location.myhome.language=en
weather:location.myhome.updateInterval=10

,items setup: (just a few, I copied the whole thing from the wiki

// temperature
Number   Temperature	"Outside Temperature [%.0f °C]"	<temperature> {weather="locationId=myhome, type=temperature, property=current"}
Number   Humidity	"Humidity [%d %%]"				weather="locationId=myhome, type=atmosphere, property=humidity"}

and my .sitemap:

Frame label="Weather" {
		Text item=Temperature valuecolor=[>25="orange",>15="green",<=15="blue"]{

I’m not sure where to extract the log though, so if you can point me in that direction I’ll gladly post it here to see if it’s the same issue. I also don’t know where my openhab.cfg file is.

Of course I’ll come back and post here if I figure it out, but I’ve been trying for a while now and still no joy.

Edit: Is the log you posted coming from the OpenHAB2 Eclipse IDE when you run the configuration? If so I’ll try get my instance running through the IDE (though it’s probably a bit too advanced for me at the moment!) A pointer would be welcome though… would I clone a local copy of my site to my PC and set up Eclipse to load it? My OH2 is currently on my Raspberry Pi. I’ll start with the IDE setup guide I guess

Either use conf/openhab.cfg with

<service>:<name>.<of>.<parameter>=<value

or use conf/services/<service>.cfg with

<name>.<of>.<parameter>=<value

I’m not sure if openHAB2 does actually read the openhab.cfg.

@Udo_Hartmann I’ve followed your format given in your post. And I’m still getting the errors I posted above. Doesn’t it look weird that the error has <locationId1> in it, yet that doesn’t exist in the file it’s supposed to parse?

Yes, that’s very strange.
As I currently do not use openHAB2 but only have made some tests so far, I can only guess…

You could try to find the file which passes the <locationId1> to openHAB2 (e.g. do a

find ./ -exec grep -i 'locationid1' /dev/null {} \;

in /etc/)

Thanks for another suggestion @Udo_Hartmann. After running that command in /etc I get nothing. I’m even more confused now.

:frowning: argh!

I found in the map config/org/openhab a (back up ?) file called "weather.config"
In the map are the old configurations which seems to caused the problem with the weather binding.

But i cant change it, its protected…

Update: I managed to get thinks working by deleting all old “stuff” in the file.

1 Like

This also helps me out.

Thank you for resolving the problem!

So I had this same issue it something was being held in memory. Basically I had a bad config but it would not go away. I had to stop OH and delete everything in /var/lib/openhab2/config/org/openhab/weather.config before starting it again. This is with OH2, hope this helps someone.

2 Likes

Clearing the incorrect entries in the /var/lib/openhab2/config/org/openhab helped me fix a lot of the services that were previous breaking. These files not getting properly updated when changes are made to the services/.cfg files is a bit of a bug

1 Like

Does anybody know if there is a newer org.openhab.ui.iconset.climacons-2.3.0-SNAPSHOT.jar for the OH2.4 release?

The one I have is dated June 5th, 2018.

Best, Jay