[SOLVED] Weather Binding / Broken

Hi,

“Weather Binding” worked already, but i wanted to correct the location name in the cfg-file.

i did a mistake by calling the location (wg-scharten)

location.wg-scharten.woeid=XXXX

and now the Binding is broken, i already corrected it again to “yhome”
i reinstalled the binding a few times - but i always get the same error, and i dont know why - because there is no “wg-scharten” any more !?

so i dont know, where it gets this “wg-scharten” from !?

my weather.cfg

# YAHOO

location.yhome.name=XXX
location.yhome.woeid=XXX
location.yhome.provider=Yahoo
location.yhome.language=de
location.yhome.updateInterval=10

# WUNDERGROUND

apikey.Wunderground=XXX
location.whome.name=XXX
location.whome.latitude=XX.XXXX
location.whome.longitude=XX.XXXX
location.whome.provider=Wunderground
location.whome.updateInterval=10
-rw-rw-r--   1 openhab openhabian 1.8K Nov 24 03:16 weather.cfg

EDIT:
After a few re-installs it shows me this: ( now the ID is empty? )
Its the same .cfg-file that was working before i made the id-change :frowning:

The yahoo-weatherBinding is working fine…

EDIT2:
i get no errors in the log now - but still “no data” !? :frowning: :frowning:

Please help - thanks

I can’t say I fully understand how OH2 works just yet, but I believe it possibly copies and loads a cfg file in to this directory (if your on Ubuntu) for faster startup. Not sure, but give this a try.

  1. Stop OH2.
  2. Go to this directory (in Ubuntu) and delete your weather.cfg.

var\lib\openhab2\config\org\openhab

  1. Restart OH2 and it will rebuild the cfg in that directory, and see what your logs show.

Thanks paul

i found the weather.config file here:

/var/lib/openhab2/config/org/openhab

there was still the “wg-scharten” inside - i deleted (.config + .cfg) and reinstalled weather binding

no errors in log - still

no success :frowning:
Please help!

Please HELP

i tried to delete the cache and tmp folder and weather.cfg and.config - still no luck :frowning:

sudo /etc/init.d/openhab2 stop
sudo rm -rf /var/lib/openhab2/cache/*
sudo rm -rf /var/lib/openhab2/tmp/*
sudo /etc/init.d/openhab2 start

what could i try ? :disappointed_relieved: :disappointed_relieved:

This is my Log now:

STILL NO DATA :disappointed_relieved:

First, never post an image of an error message. It’s useless.

However, the errors appears to indicate your items are undefined.

Thanks for reply!

sorry but i am a bit frustrated - trying for 2 days now to fix this issue :frowning:

my item looks like this:

Number   Temperatur "Temperatur [%.0f °C]"  <temperature> (gWeather)  {weather="locationId=yhome, type=temperature, property=current"}

my current weather.cfg

location.yhome.name=XXX
location.yhome.woeid=XXX
location.yhome.provider=Yahoo
location.yhome.language=de
location.yhome.updateInterval=10

I understand your frustration.

What log messages do you see when the .items file is being loaded (ie. before the errors you posted above) ?

after a restart is see no errors at all - thats my problem

thats the only line:

2017-11-24 19:44:41.969 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'weather.items'

after saving the weather.cfg i get this:

2017-11-24 19:46:55.793 [INFO ] [eather.internal.common.WeatherConfig] - LocationConfig[providerName=YAHOO,language=de,updateInterval=20,latitude=<null>,longitude=<null>,woeid=XXXXXXX,locationId=yhome,name=Scharten]

I run into the same problem.

I looks like the binding transfers weather.cfg to weather.config. But something went wrong and weather.config never gets updated.

Try to stop OH, delete weather.config and restart OH. Then make a change in weather.cfg and see if this is transfered to weather.config too.

Sometime this helps in my way, somethimes not.

I thought it is only on my machine, but now it looks as a common problem.

Has anyone outside an idea how to fix it the right way?

There are a couple things you should try.

  1. Set the log to debug level:
log:set DEBUG org.eclipse.smarthome.binding.yahooweather
  1. Check defined items. If the list doesn’t show at least the items you’ve defined for use with the weather bindings, that’s an issue…
smarthome:items list
1 Like

i already checked that 10x or so…

weather.config is the same as weather.cfg
the content is the same

As i remember the is something in the cache too. Try to search about all weather*.*. Not sure but something like this I can remember.

i already cleared the cache and tmp-folder
like i said in post 4 here:

EDIT:
i created a weather_test.items file and saved it - thats my log:

[ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'weather' of item 'Fuckyou2' could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: Could not set value whome for attribute locationid
	at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:50)[193:org.openhab.core.compat1x:2.1.0]
	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:325)[123:org.eclipse.smarthome.model.item:0.9.0.b5]
	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:297)[123:org.eclipse.smarthome.model.item:0.9.0.b5]
	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:182)[123:org.eclipse.smarthome.model.item:0.9.0.b5]
	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:367)[123:org.eclipse.smarthome.model.item:0.9.0.b5]
	at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:286)[122:org.eclipse.smarthome.model.core:0.9.0.b5]
	at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:136)[122:org.eclipse.smarthome.model.core:0.9.0.b5]
	at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:234)[122:org.eclipse.smarthome.model.core:0.9.0.b5]
	at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:297)[122:org.eclipse.smarthome.model.core:0.9.0.b5]
	at org.eclipse.smarthome.core.service.WatchQueueReader.run(WatchQueueReader.java:206)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at java.lang.Thread.run(Thread.java:748)[:1.8.0_152]

It was a long time ago I had this problem but I think I also tried to uninstall binding, deleted weather.cfg and weather.config. Reboot OH, reinstalled weather binding, see which weather*.* file are created. Configure it again.

good luke.

I know, that I had fixed it but not sure how.

smarthome:items list
gives me the correct values - wtf !? :hushed:


Temperatur (Type=NumberItem, State=1.00, Label=Temperatur, Category=temperature, Groups=[gWeather])
Temp_MinMax_2 (Type=StringItem, State=1/4, Label=übermorgen min/max, Category=line, Groups=[gWeather])
Temp_MinMax_3 (Type=StringItem, State=0/2, Label=in 3 Tagen min/max, Category=line, Groups=[gWeather])

whats wrong here ?

I think I also tried to manually change weather.config to the right settings, maybe this helps.

But do this when OH is stopped.

Then start it and see what the log tells you.

as i said - the config and the cfg are the same and correct :disappointed_relieved:

but why is the smarthome:items list fine, and my sitemap broken ?

EDIT:

[ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'weather' of item 'Fuckyou2' could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: Could not set value yhome for attribute locationid

(Could not set value yhome for attribute locationid)
WHYYYYYYYYY ???

Sorry have not read this.

I know I had this problem too, but cannot remember how I had fixed it. I will think again and come back to you.

maybe there is someone else outside which an help.

LOL - yesterday i went out with frustration and got some beers…
now i came back to my weather problem - and what do i see !?

ITS WORKING

Dont know why, i left openhab with the problem and today its gone
:blush: :hushed::expressionless:

maybe the Beer helped :smiley:

Thanks to all helpers!

====

What i have done:

  1. check if weather.cfg is correct
  2. go to this path and delete weather.config
/var/lib/openhab2/config/org/openhab
  1. Delete cache & tmp files ( u need to stop OH first )
sudo /etc/init.d/openhab2 stop
sudo rm -rf /var/lib/openhab2/cache/*
sudo rm -rf /var/lib/openhab2/tmp/*
sudo /etc/init.d/openhab2 start
  1. after restart weather.cfg and weather.config should have the same content now

  2. go to your KARAF Console and set DEBUG level

log:set DEBUG org.eclipse.smarthome.binding.yahooweather
  1. Check defined items. hopefully you see here the correct Temperature and Values
smarthome:items list

you should now see something like this ( in KARAF Console )

Temperatur (Type=NumberItem, State=1.00, Label=Temperatur, Category=temperature, Groups=[gWeather])
Temp_MinMax_2 (Type=StringItem, State=1/4, Label=übermorgen min/max, Category=line, Groups=[gWeather])
Temp_MinMax_3 (Type=StringItem, State=0/2, Label=in 3 Tagen min/max, Category=line, Groups=[gWeather])

If so, let OpenHAB think for 1 night, drink beer and come back and see the magic :wink:

hopefully this was useful for you :slight_smile:
good luck

1 Like

Thank you! (Many hours wasted before I found your solution.) :+1:

1 Like