[SOLVED] - Weather binding: Wunderground error even though Wunderground is not configured?

Hi there,

for testing purpose I have an OH v2.5 Milestone 1 build instance running and I get the following error even though I do not use Wunderground since months anymore …

13:07:34.986 [WARN ] [weather.internal.common.WeatherConfig] - Provider with name 'Wunderground' not found. Check the binding config.
13:07:34.989 [ERROR] [org.apache.felix.configadmin         ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=434, bundle=230/mvn:org.openhab.binding/org.openhab.binding.weather/1.14.0.M1]: Updating property weather of configuration org.openhab.weather caused a problem: Provider with name 'Wunderground' not found. Check the binding config.
org.osgi.service.cm.ConfigurationException: weather : Provider with name 'Wunderground' not found. Check the binding config.
	at org.openhab.binding.weather.internal.common.WeatherConfig.getProviderName(WeatherConfig.java:223) ~[?:?]
	at org.openhab.binding.weather.internal.common.WeatherConfig.parseApiKey(WeatherConfig.java:182) ~[?:?]
	at org.openhab.binding.weather.internal.common.WeatherConfig.parse(WeatherConfig.java:88) ~[?:?]
	at org.openhab.binding.weather.internal.bus.WeatherBinding.updated(WeatherBinding.java:82) ~[?:?]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker$1.run(ManagedServiceTracker.java:177) ~[9:org.apache.felix.configadmin:1.9.10]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:173) ~[9:org.apache.felix.configadmin:1.9.10]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [9:org.apache.felix.configadmin:1.9.10]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [9:org.apache.felix.configadmin:1.9.10]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1113) [9:org.apache.felix.configadmin:1.9.10]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1069) [9:org.apache.felix.configadmin:1.9.10]
	at org.apache.felix.cm.impl.UpdateThread$1.run(UpdateThread.java:126) [9:org.apache.felix.configadmin:1.9.10]
	at org.apache.felix.cm.impl.UpdateThread$1.run(UpdateThread.java:123) [9:org.apache.felix.configadmin:1.9.10]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) [9:org.apache.felix.configadmin:1.9.10]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [9:org.apache.felix.configadmin:1.9.10]
	at java.lang.Thread.run(Thread.java:748) [?:?]

I searched the community but this error did not occur in exactly the same way and similar cases are from 2015, 2016 and 2017 which I do not consider valid anymore.

I can ignore it but probably it causes some other trouble under the covers?

Thanks for any hint how to handle this.
Justus

I can force the error by changing any value in the weather.cfg file:
(e.g. changing the updateInterval)

weather:apikey.ForecastIo=<MY_DARKSKY_API_KEY>

weather:location.witchhill-fio.latitude=<MY_LATITUDE>
weather:location.witchhill-fio.longitude=<MY_LONGITUDE>
weather:location.witchhill-fio.provider=ForecastIo
weather:location.witchhill-fio.language=de
weather:location.witchhill-fio.updateInterval=10

Look to see if you have Wunderground installed via the config files at etc/openhab2/services/addons and at /var/lib/openhab2/config/org/openhab/addons.config` if the binding is showing in either place then remove it and restart OH. Note that you will want to stop OH before making a change to the /var/lib/openhab2/config/org/openhab/addons.config file.

I don’t have it activiated in the addons.cfg file (I kept the old line for documentation with a ‘#’) but the active binding config does not include weatherunderground anymore!!!

# A comma-separated list of bindings to install (e.g. "sonos,knx,zwave")
# binding = avmfritz,km1001,weather1,weatherunderground,zwave
binding = km1001,weather1,zwave,astro,avmfritz

But funny wise it is still in the config:list:

...
----------------------------------------------------------------
Pid:            org.openhab.addons0
BundleLocation: null
Properties:
   action = mail
   binding = hue,km1001,weather1,weatherunderground,zwave,astro
   package = standard
   persistence = mysql
   remote = true
   service.pid = org.openhab.addons0
   ui = basic,paper,habmin,habpanel
----------------------------------------------------------------
...

How can that happen?

Something to try, there may be a weather.config cache file a well as weather.cfg.
If there is, stop openHAB, delete the .config version. When you restart, it will be recreated.

Does it show in /var/lib/openhab2/config/org/openhab/addons.config`

I deleted already everything in the directories “cache” and “tmp” …

Where ist the .config file?

/var/lib/openhab2/config/org/openhab/addons.config`

Stop OH remove it from this file then clean cache and restart.

1 Like

There are two files ( I am running on a docker container … so different directory path …)

root@openhab-2:/openhab/userdata/config/org/openhab# ls -l add*
-rwxr-xr-x 1 openhab openhab 248 Jan  1 18:27 addons0.config
-rwxr-xr-x 1 openhab openhab 290 Feb  3 13:39 addons.config
root@openhab-2:/openhab/userdata/config/org/openhab# 

The weatherunderground binding is in the addons0.config

I will remove both … clean cache and reboot!!!

There is also an “old” weather.config. Can I delete that too?

Yes, if you do not need it.

1 Like

Did you create the second addons config or is that something docker related? I would think that you should only have one config file.

1 Like

I am not ready with rebooting … but I already see that

openhab> config:list | grep wunderground

returns nothing …

Problem solved by deleting:

addons.config
(possibly:) addons0.config
and weather.config

under /var/lib/openhab2/config/org/openhab/addons.config
or (in docker) : /openhab/userdata/config/org/openhab

Thanks for the quick and great support!!!

Is there an explanation why these config files are there being some kind of orphans and causing such troubles. I thought when cleaning cache and tmp directories all cached information is gone???

I do not know where this second addons.config file came from ???

Did you use PaperUI for addons then later swap to using the addons.cfg for adding bindings?

No, I initially used the addons.cfg file only as I like to have it all in config files. But with zwave you need to do stuff via Paper UI and therefore I used it to setup my zwave environment and that’s were my configuration got mixed up …

But I am still confused why OpenHAB keeps orphan copies of the cfg files - it was the weather.config as well which was in an old state, even though I deleted the Wunderground information weeks ago???

And how come that there is an addons0.cfg file which is interpreted anyway???
Shouldn’t OH only use the addons.cfg file???

Note that removing addons.config from /openhab/userdata/config/org/openhab if installing from PaperUI will delete all the bindings. In your case you used the addons file and had no issue. For others, that added bindings via PaperUI, they will need to edit the file and remove only the binding not needed.

I don’t use zwave but that may be where the config got mixed up?

The addons.cfg file is not the same as /var/lib/openhab2/config/org/openhab/addons.config. You should only edit the second one if having issues similar to yours.

And funny wise since last Friday - 2nd Feb - at around 6pm Darksky did not provide data anymore just in the middle of the day where I did not alter or reboot my environment:

And with removing these orphan files, this other problem was solved too. But I do not understand how this can happen during runtime when I did not change anything (I was on business travel not even at home :slight_smile: )