Not seeing weather information on My Site

Hello,

I’m still a beginner with OpenHAB and I am on 1.7, but I got it to recognize my z-wave switches and my one WeMo.

Now I am trying just to see the weather in my page, but I am a bit confused on how to do that. I am not receiving any error messages. I was before, but have fixed that.

In my OpenHAB.cfg I have this:
weather:apikey.ForecastIo=MY_API_KEY
weather:location.home.name=MyHome
weather:location.home.latitude=40.758896
weather:location.home.longitude=-73.985130
weather:location.home.language=en
weather:location.home.provider=ForecastIo
weather:location.home.updateInterval=10

I put org.openhab.binding.weather-1.7.0 in my addons folder.

In my .ITEMS file I have this:
Number Weather_Temperature “Temperature [%.2f °C]” { weather=“locationId=MyHome, type=temperature, property=current” }
Number Weather_Humidity “Humidity [%d %%]” { weather=“locationId=MyHome, type=atmosphere, property=humidity” }
Number Weather_Clouds “Clouds [%.0f %%]” {weather=“locationId=MyHome, type=clouds, property=percent”}

In my .SiteMAP file I have this:
Frame label=“Weather” icon=“house”{
Text item=Weather_Temperature label="Temp Outside"
Text item=Weather_Humidity label="Humidity Outside"
Text item=Weather_Clouds label=“Cloud”
}

I see the frame and the Temperature, Humidity and Cloud items but I don’t see the numbers.

Can you please let me know what I am missing/doing wrong?

Thank you.

In your sitemap, you are overriding the item’s labels with new labels like "Temp Outside" that are missing the placeholders that would show you the actual state values. So you can either remove the label="..." from your Text items in the sitemap, so they will use the labels from the items file, or further define them like

Text item=Weather_Temperature label="Temp Outside [%.2f °C]"
...

watou:

I really appreciate the quick and clear response.

I removed the labels from the .Sitemap and now I am seeing where the numbers should be instead of just blank. For example, I see -°C for the temperature and -% for the clouds. I am noticing an error for the humidity (I think I got that error before, so I am working on one thing at a time).

Is this a different issue?

Thank you.

Yes, you are seeing where the item states would show, if they only had been updated by something. So the question now is, what code is installed to do the updating? You should verify that the Weather binding JAR file is present in your addons directory. If it is, look at the contents of openhab.log to see if there are any ERROR or WARN messages or others of interest.

I do have the org.openhab.binding.weather-1.7.0 in my addons folder.

I see this in my openhab.log, which I assume means I connecting properly:
2016-04-17 13:34:03.917 [INFO ] [o.o.b.w.i.common.WeatherConfig] - ProviderConfig[providerName=FORECASTIO,apiKey=MY_API_KEY
2016-04-17 13:34:03.920 [INFO ] [o.o.b.w.i.common.WeatherConfig] - LocationConfig[providerName=FORECASTIO,language=en,updateInterval=10,latitude=40.758896,longitude=-73.985130,locationId=home,name=MyHome]

I don’t see any obvious ERROR or WARN statements in my openhab.log. But looking that OpenHAB command window, I see this:
Exception in thread “Timer-19” java.lang.RuntimeException: Unknown locationId in item ‘Weather_Humidity’ with binding WeatherBindingConfig[locationId=MyHome,type=atmosphere,property=humidity,roundingMode=HALF_UP,scale=2]
at org.openhab.binding.weather.internal.scheduler.WeatherJobScheduler$2.next(WeatherJobScheduler.java:99)
at org.openhab.binding.weather.internal.utils.ItemIterator.iterate(ItemIterator.java:31)
at org.openhab.binding.weather.internal.scheduler.WeatherJobScheduler.validateItemLocationIds(WeatherJobScheduler.java:94)
at org.openhab.binding.weather.internal.scheduler.WeatherJobScheduler.start(WeatherJobScheduler.java:80)
at org.openhab.binding.weather.internal.scheduler.WeatherJobScheduler$1.run(WeatherJobScheduler.java:71)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)

Your locationId should be home.

watou,

I really appreciate your help with this, so I am sorry to bother you with this issue now, but after I changed the locationID = home, I am getting this error:

2016-04-17 20:03:42.234 [ERROR] [.w.i.p.AbstractWeatherProvider] - FORECASTIO: Connection refused: connect
2016-04-17 20:03:42.248 [ERROR] [o.o.b.w.i.scheduler.WeatherJob] - Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[na:1.8.0_71]
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[na:1.8.0_71]
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:1.8.0_71]
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[na:1.8.0_71]
at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_71]
at java.net.PlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_71]
at java.net.SocksSocketImpl.connect(Unknown Source) ~[na:1.8.0_71]
at java.net.Socket.connect(Unknown Source) ~[na:1.8.0_71]
at java.net.Socket.connect(Unknown Source) ~[na:1.8.0_71]
at java.net.Socket.(Unknown Source) ~[na:1.8.0_71]
at java.net.Socket.(Unknown Source) ~[na:1.8.0_71]
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80) ~[na:na]
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122) ~[na:na]
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) ~[na:na]
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) ~[na:na]
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) ~[na:na]
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) ~[na:na]
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) ~[na:na]
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) ~[na:na]
at org.openhab.binding.weather.internal.provider.AbstractWeatherProvider.executeRequest(AbstractWeatherProvider.java:108) ~[na:na]
at org.openhab.binding.weather.internal.provider.AbstractWeatherProvider.getWeather(AbstractWeatherProvider.java:68) ~[na:na]
at org.openhab.binding.weather.internal.scheduler.WeatherJob.execute(WeatherJob.java:49) ~[na:na]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-all-2.1.7.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-all-2.1.7.jar:na]

That sounds like a problem with the weather providing service being down at the time you were trying to reach it. Does that error continue on later attempts? Can you visit the ForecastIO site in your browser and make sure it’s up and running?

watou,

I had checked that ForecastIO was up and I was able to pull data. However, just to be really sure I didn’t mess something up, I got an API key for OpenWeatherMap - and that worked!

Thank you for all your assistance on getting me up and running. If I get a chance, I will go back and review what I might have done with ForecastIO that it wasn’t working.

Thanks.