My notes after upgrading to OH 2.4 and subscribing to OWM.
I added the binding in PaperUI and i saw the 2 things created. I added my API key and then i copied the .items file from the documentation. (not the .things)
I got all the current day data but no forecast data.
After searching to the OWM site, the forum etc i realized that the PaperUI initial installation of the " Local weather and forecast" thing, left the “Number of days for daily forecast” setting to 0 (zero).
So, the documentation was providing the items for 2 days of forecast but the initial installation has a default setting for 0 days. Somehow i missed that when adding the API key. I think that the default setting when installing should be 3 (the maximum settings for free OWM plan).
I just found that the UV index API is not yet implemented and this is a drawback from the WUnderground binding i was using. I live in Greece and UV index in summer is a very important thing to know every day.
Now i will find out how to import the data to HabPanel. Thanks for this binding!
After 2 days i have figured out the whole business model / free API access of OWM
I think there should be some clarification on the documentation because i thought i could have min/max temperatures on the “tomorrow” forecast. This is something very confusing to a newcomer to OWM. I know this is not anyones fault here, i think there should be a “warning”.
So to sum it up for anyone searching for a WUndergound alternative: OWM does NOT provide min/max temperatures for the forecasts on free accounts. Only paid subscriptions provide the “forecastToday”, “forecastTomorrow” and “forecastDay2” channels stated on the demo .items on the documentation page.
I think the demo .items on the documentation should mention that the forecast items are only for paid subcriptions.
Oh, and the last note to newcomers:
The free “[5 days/3 hour forecast API]” gives you the forecasted temperatures on 3 hour intervals on seperate items.
What to do with these:
This will be a great addition to both this topic and documentation. It’s not that simple though. This has to be related to the forecast timestamps… not the “next 24 hours min and max”
@ngalfas I’m trying this as well and struggling with the icons. “weather-underground-icons” does not work anymore as you get now a number for the condition-id. And the icon that you get out of the image-channel is too small for HabPanel-Integration.
I need some help figuring out things with this binding - first off, I like this one very much, especially since Wunderground and Yahoo will stop their free API services soon.
I have a working API key for the free plan. I have figured out that I have to add the weather-and-forecast thing using
forecastHours=96, forecastDays=0
(the forecastHours something below 5*12 for the free plan and forecastDays set to zero because otherwise, I end up with @text/offline.conf-error-invalid-apikey errors.
What I am really missing is a hint on how to use forecast data beyond 24 hours. If I try to add items using a channel like openweathermap:weather-and-forecast:api:local:forecastHours48#time-stamp (extrapolating the working items for Hours12 or Hours24), I get nothing (in PaperUI, those don’t even show up in the “Local Weather and Forecast” item list on the “Control” page). In PaperUI, I see items like openweathermap:weather-and-forecast:api:local:forecastTomorrow#time-stamp advertised on the things-page of of the forecast thing, which result in having NULL/NaN data.
Are there any working examples using the free plan with forecast data for 3-5 days?
, but for example no channels with “forecastHours27”, “forecastHours30” etc.
During my experimentation yesterday I believe I saw the channels momentarily, but then they seem to have disappeared after I made an edit to the .things file. Unfortunately I didn’t keep track of my changes. Now I waited about 24hrs to see if they would pop up, but they didn’t.
The binding itself works fine for me on 2.4.0, the log however shows the following errors after a restart. Always for 27#time-stamp, the data is coming fine.
2019-01-06 11:17:51.179 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.initialize()’ on ‘org.eclipse.smarthome.binding.openweathermap.int
ernal.handler.OpenWeatherMapWeatherAndForecastHandler@9f31238’: Duplicate channels openweathermap:weather-and-forecast:cf7c8411:local:forecastHours27#time-stamp
java.lang.IllegalArgumentException: Duplicate channels openweathermap:weather-and-forecast:cf7c8411:local:forecastHours27#time-stamp
at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:159) ~[?:?]
at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:151) ~[?:?]
at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:147) ~[?:?]
at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannel(ThingBuilder.java:74) ~[?:?]
at org.eclipse.smarthome.binding.openweathermap.internal.handler.OpenWeatherMapWeatherAndForecastHandler.initialize(OpenWeatherMapWeatherAndForecastHandler.java:153) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
2019-01-06 11:17:51.216 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing ‘openweathermap:weather-and-forecast:cf7c8411:local’: Duplicate
channels openweathermap:weather-and-forecast:cf7c8411:local:forecastHours27#time-stamp
java.lang.IllegalArgumentException: Duplicate channels openweathermap:weather-and-forecast:cf7c8411:local:forecastHours27#time-stamp
at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:159) ~[?:?]
at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:151) ~[?:?]
at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:147) ~[?:?]
at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannel(ThingBuilder.java:74) ~[?:?]
at org.eclipse.smarthome.binding.openweathermap.internal.handler.OpenWeatherMapWeatherAndForecastHandler.initialize(OpenWeatherMapWeatherAndForecastHandler.java:153) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Unfortunately the quality of data in the free hourly forecast is at least for my location (Bratislava, Slovakia) miserable. I tried to write a rule collecting min and max temperature of the following three days, got weird numbers and started to investigate. I checked on their webpage and the data is inconsistent there as well - e.g. for tomorrow the daily forecast shows -6.1 °C max, -6.7 °C min, the hourly data however contain -3.1 / -10.3. Huh. Two usually reliable sources show -2/-4 and -1/-5, let’s see what the reality is but I highly doubt the -10.
I’m getting an error when trying to install this binding
[ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-
binding-openweathermap': Error: Resource mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.modules/4.2.1 does not
contain a manifest
Anyone know how to convert the temperature to Fahrenheit? I tried adding units=“imperial” at the end of the thing configuration, but does not seem to help:
Thing weather-and-forecast local "Local Weather And Forecast" [location="42.99, -71.14", forecastHours=0, forecastDays=7, units="imperial" ]
I’ve searched on the OpenWeather site and it reads to get fahrenheit, add units=imperial to the API call, but I am not sure where to add this. I figured on the Thing configuration would be the place, but alas, no. It also did not work not having imperial in quotes.