Weather binding. - not yahoo weather binding

More playing/testing.

Ok, so I.started from scratch again. I used paperui to install ntp binding and it worked like a charm. I then added the weather binding and it shows as installed under extensions. Checked the log and it shows
2016-03-27 23:45:40.399 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘binding-weather’ has been installed.

Ok here is the but. It does not show up under configuration/bindings or configuration/things on paperui. So I can not configure it. Weird thing is it does create a weather.cfg file under conf/services when I looked.

I did not see this under issues so I thought as a new guy I had better ask if I missed it or should add an issue?

For OH 1.x bindings currently, you are to edit the contents of the weather.cfg file that you found in conf/services, and the weather binding ought to pick up those changes to the file.

I also use the weather binding
but the HTML templates are not working --> by /static/

how are these working in oh2?

I have the same issue and have tried fresh install. Interesting thing is that it still seems to be hanging on to the locationid of ‘locationid1’ of which i changed to myhome. You see that it sees ‘myhome’ as well as still looking at ‘locationid1’ Also, i noticed that it seems to be dropping the first few letters of the log output - **[ternal.**scheduler.WeatherJobScheduler]

2016-03-28 19:54:34.559 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Disabling weather locationId ‘myhome’, no binding available
2016-03-28 19:54:34.562 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Disabling weather locationId ‘locationId1’, no binding available

This may be similar to a bug @lolodomo reported about startup order under openHAB 2, where the binding expected the items to be loaded, and on not finding any bound items, does not start polling or reading its input (or something like that – @lolodomo, does this sound familiar?)

I had that.
Please be sure to also remove the < >
Just …myhome…

As this binding is working apparently well for me in OH2, I would assume the problem is more a wrong setup in file weather.cfg.

Been trying some different things, and not able to get weather working. I have ntp working and a simple sitemap displaying current date and time, so i can confirm at least the basics are there.

When i install the extension through paperui, it says installed. A check of the logs also shows that it is installed. However, i also get that no binding is available. Do i need something in the addons folder for the binding?

2016-04-03 15:16:41.854 [INFO ] [smarthome.event.ExtensionEvent      ] - Extension 'binding-weather' has been installed.
2016-04-03 15:19:49.580 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Disabling weather locationId '<locationId1>', no binding available

I have the weather.cfg file in the services directory, and i have configured as such:

# 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=
apikey.Wunderground=xxxxxxx
#apikey.Hamweather=
#apikey2.Hamweather=

# location configuration, you can specify multiple locations
location.myhome.name=Pace Home
location.myhome.latitude=311.111
location.myhome.longitude=-11.111
#location.<locationId1>.woeid=      (required for Yahoo provider)
location.myhome.provider=Wunderground
location.myhome.language=en
location.myhome.updateInterval=10 

#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=

Ok, I went ahead and established the items and sitemap updates for the weather binding and am now seeing data. Being new, i assumed at least the binding would work/initialize the same as ntp did in paperui. In fact, i do not show anything under the bindings on paperui for weather except for the extension showing installed.

Should the weather binding be showing up in paperui bindings page like ntp?

I’m having the same issue as you. What exactly did you do to get it to work?

After installing the weather binding, i updated the weather.cfg file in the services folder to match what i had in the config file in OH1. I then added the weather items to the items file and updated the sitemap to display them the same as I did in OH1. Once i did that, i started to see the items populated in the sitemap with the weather data from Wunderground.

I think the confusing part is knowing when you have to do things manually vs it being auto discovered, etc. Part of the learning process i guess.

The HTML Templates from static do not work for me?
Anybody got them working?

I receive:

2016-04-08 10:42:56.438 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Disabling weather locationId ‘home’, no binding available

when trying that. Is there any way you could post your working weather.cfg and relevant items file lines? It looks like I’m not the only one with this issue. Thanks.

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=
apikey.Wunderground=<my wunderground api key>
#apikey.Hamweather=
#apikey2.Hamweather=

# location configuration, you can specify multiple locations
location.myhome.name=Pace Home
location.myhome.latitude=11.2222
location.myhome.longitude=-33.44444
#location.<locationId1>.woeid=      (required for Yahoo provider)
location.myhome.provider=Wunderground
location.myhome.language=en
location.myhome.updateInterval=10

#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=

items file:

Number Current_Temp "Outside Temperature [%.2f °F]" <temperature> {weather="locationId=myhome, type=temperature, property=current, scale=1,unit=fahrenheit",imperihab="room:Weather,label:Temperature,type:DevTemperature"}

sitemap entry:
Text item=Current_Temp

This only shows up on the sitemap that i created, and not in any of the auto created areas. Assuming that is because this is a non-native OH2 binding.

Hope this helps,
Travis

Still plugging away at this guys…

I’ve must have missed something fundamental about how the weather binding works as I’ve done a test with a garbage weather.cfg file and it makes no difference in what appears in Basic UI.

When I correctly link the Temperature item it returns the correct value (always true to what Google says)

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

Then I try to retrieve the min and max values, but these have never worked…

Number  Temp_Min	"Temperature min [%.0f °C]"	<temperature> {weather="locationId=myhome, type=temperature, property=min"}
Number  Temp_Max	"Temperature max [%.0f °C]"	<temperature> {weather="locationId=myhome, type=temperature, property=max"}

So I’m wondering if maybe OH2 is retrieving the temperature internally? I’ve looked all over but can’t seem to find anything.

Number  Temperature	"Temperature [%.0f °C]"		<temperature> {weather="locationId=myhome, type=temperature, property=current"}
Number  Temp_Min	"Temperature min [%.0f °C]"	<temperature> {weather="locationId=myhome, type=temperature, property=min"}
Number  Temp_Max	"Temperature max [%.0f °C]"	<temperature> {weather="locationId=myhome, type=temperature, property=max"}

My sitemap:

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

Please be aware that while I have the weather binding installed in Paper UI, it does not show up is a ‘thing’ in my inbox. Maybe it’s not properly installed? I wouldn’t know how to check, though I still get my 17deg.

Open to any advice guys…

Hi,
it is absolutely correct that you don’t see any weather binding relasted thing in your inbox, as this is a openHAB 1.x binding. You need to configure it through a weather.cfg file. Examples can be found earlier in this thread.

Ah thanks that explains why I didn’t see it there.

But the devil is in the detail…

So I threw in a couple more items onto my sitemap. Some return data and others not.

Based on these weather properties (as defined in the items file:

Text item=Temp_Max valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
Text item=Temp_Min valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
Text item=Humidity
Text item=Pressure
Text item=UV_Index
Text item=Clouds
Text item=Condition
Text item=Rain
Text item=Precip_Probability
Text item=Wind_Speed
Text item=Wind_Direction
Text item=Station_Name

Then I go and delete everything in my weather.cfg file and refresh, and I see the same results. So I guess maybe there’s something based on my IP address collecting weather data instead of the binding, but that’s outside of my realm of understanding.

I’ll post up here if I find out anything.

Edit:
Just a quick update. Uninstalled the weather binding and not data returned which would be expected. Now I’m just stumped how the contents of the weather.cfg make no difference at all

So the solution is to set forecast information in the items definition

Number   Temp_Min		"Temperature min [%.0f °C]"	{weather="locationId=myhome, forecast=1, type=temperature, property=min"}
Number   Temp_Max		"Temperature max [%.0f °C]"	{weather="locationId=myhome, forecast=1, type=temperature, property=max"}

Hope that helps anyone else out there.

Still it would be interesting to know more about the weather.cfg link. That’s got me

1 Like

Hello, could you please tell me how to figure out or where to find the right details about latitude and longitude on the weather.cfg? Is there any site where you can find that info based on the city name or so?
Thanks.

Hey there,

Google works for me :slight_smile:

https://www.google.com/search?ei=BwRrXMGpL4zHwQLaoqS4CA&q=kyalami+gps+coordinates&oq=kyalami+gps+coordinates&gs_l=psy-ab.3..35i39.182223.184796..186551...0.0..0.402.1318.2j2j2j0j1…0…1…gws-wiz…0i71j0i7i30j0i8i7i30j0i5i30j0i8i30.odfLbN79pLk

In OpenHAB, I use the co-ordinates without and spaces and it works fine…

You could also try https://latitude.to