I got a bunch of these on August 19, but it’s been clear since then (other than the occasional EOFException, which I think is an issue on the Weather Company side).
Thanks for the response. Seems to be working again.
After installing this binding, i actually got the davis binding to work so my PWS data is being captured by OpenHAB that way. I still need a WU upload though because my sprinkler system and a few other things pull their data from my PWS there.
I was thinking about installing Weewx as a method of getting the data to WU. Do you think the upload method used by Weewx is more stable from WUs perspective than the one used by this binding. To be clear, i know your binding was not the issue here and it has been stable since i started using it. I am more wondering if WU provides a more stable upload method to Weexx than the openhab bindings.
I’m not clear on what you’re asking. The binding doesn’t interact at all with Weather Underground. It downloads everything (forecast and PWS data) from the Weather Company API.
Sorry i think i was tired when i wrote this. Not sure exactly what i was asking.
Wow. Thanks for this binding.
I had unistalled the WU binding for some time now. And now i looked into this thread, downloaded your .jar and it worked instantly.
My only question aside from the binding itself.
Do you feed any HabPanel widget with this ? Suggestions ?
I haven’t developed any HABpanel widgets, but I have a dashboard that I developed that might give some inspiration for a widget(s). This is a combo of the forecast, my PWS data, and some sensors in my raised bed garden.
Edit: The form factor is for an Amazon 10" tablet in Kiosk mode.

Hello Mark,
Thanks for writing this binding. I think I got it fully working, at least I can read all variables and see my own weather data and the forecase. Great job!
Now I just have to learn how to turn this into a nice UI. I’ll start with your suggested layout above ![]()
/Hermann
Hi everyone i have 2.4 build and when placing the file in the addon folder i get the error below.
12:50:48.294 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle:
file:/usr/share/openhab2/addons/org.openhab.binding.weathercompany.jar
org.osgi.framework.BundleException: Could not resolve module:
org.openhab.binding.weathercompany [289]
Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260)
[10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233)
[10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520)
[10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365)
[10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316)
[10:org.apache.felix.fileinstall:3.6.4]
Any advice welcome!!!
See here.
Hi Mark!
Do you plan to merge this new binding version with OH2.5 or this will be rather 2.6?
See my first post in this thread. It was merged this past week.
Hi, Mark.
Wunderground API have an option for decimal precision, &numericPrecision=decimal. Is it possible to add an option for decimal precision for your binding?
Thanks.
Thanks for pointing this out! There have been many, many complaints about the temperature precision, especially from those who use Celsius.
I’m not sure when they added this option, but I just tried it out and it works as expected. From what I can see, it only works for the PWS query. The 5-day forecast query doesn’t have this option.
I’ll add this to the binding, but I need to evaluate whether it will be a breaking change for existing users. Hopefully it won’t be.
Just clarifying that this impacts the following temperatures.
temp 52.2
heatIndex 52.2
dewpt 15.4
windChill 52.2
@morchee I submitted the PR to use the numericPrecision query parameter.
@morchee The change was merged today, so this feature will be in the next release (2.5.3).
Thanks for a good news, Mark!
Hi @mhilbush,
First of all thanks for all of your work on this binding! So far it’s been an absolute breeze to set up and use. I picked up the 2.5.3 release a couple of days ago and I’m noticing a new error when the binding retrieves my PWS observations. It seems that the observation handler is still expecting an integer for humidity even though with your change TWC is now sending humidity with a decimal place. I’ve noticed that the code still works if the humidity has a 0 in the decimal place (e.g. 67.0) but errors if it’s anything else (e.g. 67.1 or whatever).
The net effect, at least with the readings my PWS is sending, is that OH only successfully updates every few hours or so even though I’m requesting updates every 15 minutes. In other words, it’s not a catastrophic problem, but it is at least a bit annoying.
Here’s an example of what I’m seeing in the logs with debugging turned on for the observations handler. If you need more let me know.
2020-03-22 11:04:26.804 [DEBUG] [er.WeatherCompanyObservationsHandler] - Handler: Parsing PWS observations response: {"observations":[{"stationID":"KMNROSEV32","obsTimeUtc":"2020-03-22T16:00:09Z","obsTimeLocal":"2020-03-22 11:00:09","neighborhood":"Roseville","softwareType":null,"country":"US","solarRadiation":null,"lon":-93.149,"realtimeFrequency":null,"epoch":1584892809,"lat":44.997,"uv":null,"winddir":208,"humidity":60.3,"qcStatus":1,"imperial":{"temp":37.9,"heatIndex":37.9,"dewpt":25.3,"windChill":37.9,"windSpeed":2.1,"windGust":4.6,"pressure":29.26,"precipRate":0.00,"precipTotal":0.00,"elev":942.0}}]}
2020-03-22 11:04:26.806 [DEBUG] [er.WeatherCompanyObservationsHandler] - Handler: Error parsing pws observations response object: java.lang.NumberFormatException: Expected an int but was 60.3 at line 1 column 311 path $.observations[0].humidity
com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 60.3 at line 1 column 311 path $.observations[0].humidity
at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:227) ~[bundleFile:?]
at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:217) ~[bundleFile:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[bundleFile:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[bundleFile:?]
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) ~[bundleFile:?]
at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72) ~[bundleFile:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[bundleFile:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[bundleFile:?]
at com.google.gson.Gson.fromJson(Gson.java:888) ~[bundleFile:?]
at com.google.gson.Gson.fromJson(Gson.java:853) ~[bundleFile:?]
at com.google.gson.Gson.fromJson(Gson.java:802) ~[bundleFile:?]
at com.google.gson.Gson.fromJson(Gson.java:774) ~[bundleFile:?]
at org.openhab.binding.weathercompany.internal.handler.WeatherCompanyObservationsHandler.refreshPwsObservations(WeatherCompanyObservationsHandler.java:139) [bundleFile:?]
at org.openhab.binding.weathercompany.internal.handler.WeatherCompanyObservationsHandler.access$0(WeatherCompanyObservationsHandler.java:126) [bundleFile:?]
at org.openhab.binding.weathercompany.internal.handler.WeatherCompanyObservationsHandler$1.run(WeatherCompanyObservationsHandler.java:66) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Caused by: java.lang.NumberFormatException: Expected an int but was 60.3 at line 1 column 311 path $.observations[0].humidity
at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1204) ~[bundleFile:?]
at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:225) ~[bundleFile:?]
... 21 more
Good find. Not sure how I missed that. I’ll have a fix today or tomorrow. I’ll post back here when it’s fixed.
If you want to use it before 2.5.4, you’ll need to uninstall the binding and use the jar file containing the fix.
Edit: I don’t think my weather station reports fractional humidity. That’s probably why it always worked for me.