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"