Weather... wunderground, can't get it to work

I’m trying to get the weather binding to work with my openhab 1.7.1 install (on raspberry pi). It’s “mostly” working, but it won’t go the “last mile” and show the temp in my sitemap. I’m sure it’s something simple/stupid, but any extra set of eyes to help me see the error of my ways would be more than appreciated.

openhab.cfg:

weather:apikey.Wunderground=353fd383a14b236b
weather:location.home.latitude=42.333829
weather:location.home.longitude=-71.202007
weather:location.home.provider=Wunderground
weather:location.home.language=en
weather:location.home.updateInterval=120
weather:location.home.name=Newton

from openhab.log, under DEBUG mode
You can see (I think) that the weather provider loads, and it’s loading the correct weather information (current and forecast):

2015-12-30 20:48:05.819 [INFO ] [o.o.b.w.i.common.WeatherConfig] - ProviderConfig[providerName=WUNDERGROUND,apiKey=353fd383a14b236b]
08:46:11.657 [INFO ] [o.o.b.w.i.common.WeatherConfig:228  ] - ProviderConfig[providerName=WUNDERGROUND,apiKey=353fd383a14b236b]

2015-12-30 20:48:05.822 [INFO ] [o.o.b.w.i.common.WeatherConfig] - LocationConfig[providerName=WUNDERGROUND,language=en,updateInterval=120,latitude=42.333829,longitude=-71.202007,locationId=home,name=Newton]
08:46:11.661 [INFO ] [o.o.b.w.i.common.WeatherConfig:232  ] - LocationConfig[providerName=WUNDERGROUND,language=en,updateInterval=120,latitude=42.333829,longitude=-71.202007,locationId=home,name=Newton]

8:51:21.086 [DEBUG] [.w.i.p.AbstractWeatherProvider:75   ] - WUNDERGROUND[home]: Weather[Temperature[current=1.2,min=<null>,max=<null>,feel=1.0,dewpoint=1.0],Atmosphere[humidity=95,visibility=1.2,pressure=1016.0,pressureTrend=down,ozone=<null>,uvIndex=0],Clouds[percent=<null>],Condition[text=Mostly Cloudy,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Thu Dec 31 08:51:09 EST 2015,id=<null>,icon=mostlycloudy,commonId=mostly-cloudy-day],Precipitation[rain=0.0,snow=0.0,probability=20],Wind[speed=<null>,direction=<null>,degree=<null>,gust=0.0,chill=1.0],Station[name=Chestnut Hill, Chestnut Hill, Massachusetts,id=KMACHEST3,latitude=42.333607,longitude=-71.181183],<null>]
08:51:21.090 [DEBUG] [.w.i.p.AbstractWeatherProvider:77   ] - WUNDERGROUND[home]: Forecast[day=0,Temperature[current=<null>,min=-2.0,max=6.0,feel=<null>,dewpoint=<null>],Atmosphere[humidity=80,visibility=<null>,pressure=<null>,pressureTrend=<null>,ozone=<null>,uvIndex=<null>],Clouds[percent=<null>],Condition[text=Partly Cloudy,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Thu Dec 31 19:00:00 EST 2015,id=<null>,icon=partlycloudy,commonId=partly-cloudy-day],Precipitation[rain=0.0,snow=0.0,probability=0],Wind[speed=14.0,direction=WNW,degree=286,gust=<null>,chill=<null>],Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]
08:51:21.094 [DEBUG] [.w.i.p.AbstractWeatherProvider:77   ] - WUNDERGROUND[home]: Forecast[day=1,Temperature[current=<null>,min=-3.0,max=5.0,feel=<null>,dewpoint=<null>],Atmosphere[humidity=60,visibility=<null>,pressure=<null>,pressureTrend=<null>,ozone=<null>,uvIndex=<null>],Clouds[percent=<null>],Condition[text=Clear,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Fri Jan 01 19:00:00 EST 2016,id=<null>,icon=clear,commonId=sunny],Precipitation[rain=0.0,snow=0.0,probability=0],Wind[speed=19.0,direction=W,degree=262,gust=<null>,chill=<null>],Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]
08:51:21.097 [DEBUG] [.w.i.p.AbstractWeatherProvider:77   ] - WUNDERGROUND[home]: Forecast[day=2,Temperature[current=<null>,min=-2.0,max=4.0,feel=<null>,dewpoint=<null>],Atmosphere[humidity=57,visibility=<null>,pressure=<null>,pressureTrend=<null>,ozone=<null>,uvIndex=<null>],Clouds[percent=<null>],Condition[text=Clear,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Sat Jan 02 19:00:00 EST 2016,id=<null>,icon=clear,commonId=sunny],Precipitation[rain=0.0,snow=0.0,probability=0],Wind[speed=21.0,direction=W,degree=272,gust=<null>,chill=<null>],Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]
08:51:21.100 [DEBUG] [.w.i.p.AbstractWeatherProvider:77   ] - WUNDERGROUND[home]: Forecast[day=3,Temperature[current=<null>,min=-6.0,max=4.0,feel=<null>,dewpoint=<null>],Atmosphere[humidity=54,visibility=<null>,pressure=<null>,pressureTrend=<null>,ozone=<null>,uvIndex=<null>],Clouds[percent=<null>],Condition[text=Clear,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Sun Jan 03 19:00:00 EST 2016,id=<null>,icon=clear,commonId=sunny],Precipitation[rain=0.0,snow=0.0,probability=0],Wind[speed=19.0,direction=W,degree=260,gust=<null>,chill=<null>],Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]
08:51:21.103 [DEBUG] [.w.i.p.AbstractWeatherProvider:77   ] - WUNDERGROUND[home]: Forecast[day=4,Temperature[current=<null>,min=-11.0,max=-3.0,feel=<null>,dewpoint=<null>],Atmosphere[humidity=50,visibility=<null>,pressure=<null>,pressureTrend=<null>,ozone=<null>,uvIndex=<null>],Clouds[percent=<null>],Condition[text=Partly Cloudy,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Mon Jan 04 19:00:00 EST 2016,id=<null>,icon=partlycloudy,commonId=partly-cloudy-day],Precipitation[rain=0.0,snow=0.0,probability=20],Wind[speed=18.0,direction=N,degree=355,gust=<null>,chill=<null>],Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]
08:51:21.106 [DEBUG] [.w.i.p.AbstractWeatherProvider:77   ] - WUNDERGROUND[home]: Forecast[day=5,Temperature[current=<null>,min=-7.0,max=-4.0,feel=<null>,dewpoint=<null>],Atmosphere[humidity=35,visibility=<null>,pressure=<null>,pressureTrend=<null>,ozone=<null>,uvIndex=<null>],Clouds[percent=<null>],Condition[text=Clear,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Tue Jan 05 19:00:00 EST 2016,id=<null>,icon=clear,commonId=sunny],Precipitation[rain=0.0,snow=0.0,probability=0],Wind[speed=16.0,direction=NW,degree=321,gust=<null>,chill=<null>],Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]
08:51:21.109 [DEBUG] [.w.i.p.AbstractWeatherProvider:77   ] - WUNDERGROUND[home]: Forecast[day=6,Temperature[current=<null>,min=-3.0,max=4.0,feel=<null>,dewpoint=<null>],Atmosphere[humidity=34,visibility=<null>,pressure=<null>,pressureTrend=<null>,ozone=<null>,uvIndex=<null>],Clouds[percent=<null>],Condition[text=Clear,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Wed Jan 06 19:00:00 EST 2016,id=<null>,icon=clear,commonId=sunny],Precipitation[rain=0.0,snow=0.0,probability=0],Wind[speed=13.0,direction=WSW,degree=247,gust=<null>,chill=<null>],Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]
08:51:21.112 [DEBUG] [.w.i.p.AbstractWeatherProvider:77   ] - WUNDERGROUND[home]: Forecast[day=7,Temperature[current=<null>,min=-2.0,max=5.0,feel=<null>,dewpoint=<null>],Atmosphere[humidity=42,visibility=<null>,pressure=<null>,pressureTrend=<null>,ozone=<null>,uvIndex=<null>],Clouds[percent=<null>],Condition[text=Clear,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Thu Jan 07 19:00:00 EST 2016,id=<null>,icon=clear,commonId=sunny],Precipitation[rain=0.0,snow=0.0,probability=20],Wind[speed=10.0,direction=WSW,degree=242,gust=<null>,chill=<null>],Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]
08:51:21.115 [DEBUG] [.w.i.p.AbstractWeatherProvider:77   ] - WUNDERGROUND[home]: Forecast[day=8,Temperature[current=<null>,min=-2.0,max=6.0,feel=<null>,dewpoint=<null>],Atmosphere[humidity=57,visibility=<null>,pressure=<null>,pressureTrend=<null>,ozone=<null>,uvIndex=<null>],Clouds[percent=<null>],Condition[text=Partly Cloudy,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Fri Jan 08 19:00:00 EST 2016,id=<null>,icon=partlycloudy,commonId=partly-cloudy-day],Precipitation[rain=0.0,snow=0.0,probability=20],Wind[speed=13.0,direction=N,degree=359,gust=<null>,chill=<null>],Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]
08:51:21.118 [DEBUG] [.w.i.p.AbstractWeatherProvider:77   ] - WUNDERGROUND[home]: Forecast[day=9,Temperature[current=<null>,min=-4.0,max=4.0,feel=<null>,dewpoint=<null>],Atmosphere[humidity=64,visibility=<null>,pressure=<null>,pressureTrend=<null>,ozone=<null>,uvIndex=<null>],Clouds[percent=<null>],Condition[text=Partly Cloudy,lastUpdate=Thu Dec 31 08:51:21 EST 2015,observationTime=Sat Jan 09 19:00:00 EST 2016,id=<null>,icon=partlycloudy,commonId=partly-cloudy-day],Precipitation[rain=0.0,snow=0.0,probability=20],Wind[speed=14.0,direction=N,degree=8,gust=<null>,chill=<null>],Station[name=<null>,id=<null>,latitude=<null>,longitude=<null>],<null>]
08:51:21.148 [DEBUG] [.o.b.i.InsteonPLMActiveBinding:511  ] - got msg: IN:Cmd:0x50|fromAddress:3C.42.42|toAddress:39.53.EB|messageFlags:0x2F=ACK_OF_DIRECT:3:3|command1:0x02|command2:0x00|

items
This is where I think the error is… something with not getting the reference to the information retrieved from wunderground into the right configuration for the items file.

Number   Temperature	"Temperature [%.2f °F]"   {Weather="locationId=home, type=Temperature, property=current"}
Number   Humidity		"Humidity [%d %%]"        {Weather="locationId=home, type=Atmosphere, property=humidity"}
DateTime LastUpdate		"Last update [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"        {weather="locationId=home, type=condition, property=lastUpdate"}
String   Station_Name         "Station Name [%s]"        {weather="locationId=home, type=Station, property=name"}

sitemap
Here’s the site map… but this is pretty standard…

Text item=Temperature label="Temp" 
Text item=Humidity label="Humidity"
Text item=Station_Name label="Station"

I think your location ID is wrong.

weather:location.home.name=home

Your sitemap’s labels are overriding the items’ labels. Remove the label="..." from your sitemap so it will show the items’ labels. The key is the section in [ ] blocks in the labels that format the actual value.

Thank you all for the help. The issue was two fold: 1, the binding was using an uppercase “W” in Weather, and “T” in Temperature; 2, the sitemap was wrong by including the label (thank you @watou).

Follow on question: the log indicates that the binding is returning properties (ex: WUNDERGROUND[home]: Weather[Temperature[current=1.2 …). These show a CAPS W in, for example Weather and Temperature. How was I supposed to know that they’re actually lowercase?

The documentation on the wiki page has many examples of the binding configs.

Wonderground is working in my installation but I am observing that the switching of days is delayed by about 6 hours.
E.g.,right now at about 5 o’clock in the morning it still showing “today” as Friday but not as it should be Saturday.

I also use Wunderground and I’m seeing Saturday as of 6:30 AM. By “today”, do you mean a value from lastUpdate or observationTime? Have you turned on weather debug logging to determine if Wunderground is sending incorrect values.

Hi Steve,
Thanks for the reply.
It is now 5:18 and the binding as received it last update at 5:05.
Again it is showing today, as Saturday, allthough we already have Sunday.

It seems allthough the binding has received an update
2016-01-03 05:10:24 - ObservationTime state updated to 2016-01-03T05:05:32

the Forecast day has incorrectly updated.
Below you find a filter on the update item “Forecast_Day_1” has received.

2016-01-01 07:31:05 - Forecast_Day_1 state updated to 2016-01-02T12:00:00
2016-01-01 08:04:21 - Forecast_Day_1 state updated to 2016-01-02T12:00:00
2016-01-02 07:04:21 - Forecast_Day_1 state updated to 2016-01-03T12:00:00
… during this time I have restarted the binding a couple of times
2016-01-02 11:14:05 - Forecast_Day_1 state updated to 2016-01-03T12:00:00
2016-01-02 11:33:34 - Forecast_Day_1 state updated to 2016-01-03T12:00:00
2016-01-02 12:55:24 - Forecast_Day_1 state updated to 2016-01-03T12:00:00
… no update after this event of Forecast_Day_1

It seems that Forecast_Day_1 is roughly updated to the correct day at about 7:00. I noticed this also for other dates.
It seems that the binding is receiving wrong data from the weather provider.

I will turn on the debug for the weather binding a provide further information.

regards
Martin

PS: I have just realized that I am using OpenWeatherMap not wunderground

Have you checked that your timezone is configured correctly to your current timezone on your RasPi? You will find a lot of discussion about timezone issues on this thread.

I am using windows.
Is there anything to consider here as well?

Oops, I mistakenly thought you were OP who said he was running on a RasPi. On Windows just make sure you’re machine is set to the correct timezone. I suppose you should also check that the configured location in openhab.cfg is your desired location.

Beyond that I’m at a loss.