[SOLVED] Weatherflow Smart Weather Station binding

Yes, the data for all of the observation fields is exactly as reported by the UDP API. I’ve got a separate binding (weather calculations) that handles derived values. I haven’t really thought about what derived data might be interesting for the Sky… it’s currently mostly things like wind chill and such.

I think the precipitation type field may be new; it is listed in the v47 UDP API docs. Is it populating for you?

I haven’t seen any values in the precipitation type field, but maybe because I’m running firmware v43?

that’s probably the reason, I don’t recall it being present in earlier firmwares.

Hi Bill,
How are you, and how the things are going with the binding? Do you maybe have some updated version of the weatherstation binding and weather calculations binfing for testing? CHeers!

Hi!

I just uploaded a new version of the weather calculations binding… I think it’s getting pretty close to being “done”. The only thing I am unsure about is the pressure trend calculation. The weather has been consistently stormy the last week or two, so the pressure hasn’t changed much.

More details about what’s new are listed over at the Weather Calculations thread:

I got my Sky permanently mounted last weekend, and it seems to be working well. I’m logging data using the influxdb persistence module and then graphing the data using grafana. I’m pretty pleased with the individual pieces, but haven’t prepared a nice habpanel display (yet?)

I am working on making the Weatherflow binding ready for internationalization… getting all of the strings extracted so that translations into languages besides english are possible. I might have that finished this weekend. I made a new (unannounced build) the other day, feel free to give it a try, or just wait for the next one later this weekend!

The other big thing I’d like to take care of handling wind, precipitation and lightning events. It seems to me that the best way to handle this is through the use of custom “events”, which are similar to the events that OpenHAB already uses to handle things like item state changes.

I’ve got some preliminary work on that working and sending events, and they bubble up to things like PaperUI. So, while the framework supports transmitting them, none of the UIs, nor the default Rules engine know how to do anything with them (yet). I’m going to try to see how much work it would take to close that gap. I hope won’t be much, since they all operate in terms of /other types/ of events.

1 Like

Hi Bill,
Great news! thank you very much for your involvement! I have my Sky already too, but not installed yet permanently. Let me know if I can help you anyhow. I’m not sure if you’re aware about the home automation topic on weatherflow community.
Cheers

Hi,

Thanks for the kind words… I’m always happy to have help, whether it’s just yelling when something isn’t working properly or translations or new ideas or code.

I joined the Weatherflow Community a while back, but haven’t had a lot of spare time to participate lately. Hopefully soon, though.

Hi Bill, I get the following frequently:

2018-08-05 20:23:42.061 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'EventSubscriber.receive()' on 'org.openhab.binding.weathercalculations.internal.WeatherCalculationsEventSubscriberImpl@3a91c4': org.eclipse.smarthome.core.library.types.DecimalType cannot be cast to org.eclipse.smarthome.core.library.types.QuantityType
java.lang.ClassCastException: org.eclipse.smarthome.core.library.types.DecimalType cannot be cast to org.eclipse.smarthome.core.library.types.QuantityType
        at org.openhab.binding.weathercalculations.handler.WeatherCalculationsHandler.eventReceived(WeatherCalculationsHandler.java:136) [277:org.openhab.binding.weathercalculations:2.3.0.201807270026]
        at org.openhab.binding.weathercalculations.internal.WeatherCalculationsEventSubscriberImpl.receiveTypedEvent(WeatherCalculationsEventSubscriberImpl.java:77) [277:org.openhab.binding.weathercalculations:2.3.0.201807270026]
        at org.openhab.binding.weathercalculations.internal.WeatherCalculationsEventSubscriberImpl.receiveTypedEvent(WeatherCalculationsEventSubscriberImpl.java:1) [277:org.openhab.binding.weathercalculations:2.3.0.201807270026]
        at org.eclipse.smarthome.core.events.AbstractTypedEventSubscriber.receive(AbstractTypedEventSubscriber.java:54) [101:org.eclipse.smarthome.core:0.10.0.oh230]
        at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) ~[?:?]
        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) [101:org.eclipse.smarthome.core:0.10.0.oh230]
        at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.oh230]
        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) [?:?]
2018-08-05 20:23:42.092 [ERROR] [me.core.internal.events.EventHandler] - Dispatching/filtering event for subscriber 'org.eclipse.smarthome.core.events.EventSubscriber' failed: org.eclipse.smarthome.core.library.types.DecimalType cannot be cast to org.eclipse.smarthome.core.library.types.QuantityType
java.lang.ClassCastException: org.eclipse.smarthome.core.library.types.DecimalType cannot be cast to org.eclipse.smarthome.core.library.types.QuantityType
        at org.openhab.binding.weathercalculations.handler.WeatherCalculationsHandler.eventReceived(WeatherCalculationsHandler.java:136) [277:org.openhab.binding.weathercalculations:2.3.0.201807270026]
        at org.openhab.binding.weathercalculations.internal.WeatherCalculationsEventSubscriberImpl.receiveTypedEvent(WeatherCalculationsEventSubscriberImpl.java:77) [277:org.openhab.binding.weathercalculations:2.3.0.201807270026]
        at org.openhab.binding.weathercalculations.internal.WeatherCalculationsEventSubscriberImpl.receiveTypedEvent(WeatherCalculationsEventSubscriberImpl.java:1) [277:org.openhab.binding.weathercalculations:2.3.0.201807270026]
        at org.eclipse.smarthome.core.events.AbstractTypedEventSubscriber.receive(AbstractTypedEventSubscriber.java:54) [101:org.eclipse.smarthome.core:0.10.0.oh230]
        at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) ~[?:?]
        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) [101:org.eclipse.smarthome.core:0.10.0.oh230]
        at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.oh230]
        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) [?:?]

Cheers!

Sorry for not replying sooner, I didn’t see your message until today… I’ve got a fix for this problem; I need to test it for a day or so but will drop another note when I’ve uploaded a new binary.

I’ve uploaded a new version; it should fix these errors. Please give it a try and let me know if you have any problems with it.

Hi Bill!
I’m getting the following error when openhab starts:

2018-09-05 23:04:40.720 [ERROR] [nhab.binding.weatherflowsmartweather] - [org.openhab.binding.weatherflowsmartweather.discovery.hub] Cannot register Component
org.osgi.service.component.ComponentException: The component name 'org.openhab.binding.weatherflowsmartweather.discovery.hub' has already been registered by Bundle 276 (org.openhab.binding.weatherflowsmartweather) as Component of Class org.openhab.binding.weatherflowsmartweather.internal.SmartWeatherDiscoveryService
        at org.apache.felix.scr.impl.ComponentRegistry.checkComponentName(ComponentRegistry.java:222) [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:448) [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:315) [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:268) [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:388) [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.Activator.access$200(Activator.java:54) [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:265) [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:254) [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:227) [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.utils.extender.AbstractExtender.addingBundle(AbstractExtender.java:187) [39:org.apache.felix.scr:2.0.12]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469) [?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415) [?:?]
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [?:?]
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [?:?]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) [?:?]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [?:?]
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [?:?]
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [?:?]
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) [?:?]
        at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [?:?]
        at org.eclipse.osgi.container.Module.start(Module.java:467) [?:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) [?:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1613) [?:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) [?:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) [?:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]

It’s possible that openhab has two different bindings running at once. This has happened to me a few times… Some suggestions:

1.remove any smartweather jars from your addons directory
2. start up the openhab command line client.
3. run bundle:list and look for (possibly multiple) smartweather binding entries. make a note of their bundle id numbers.
4. use bundle:uninstall [bundle number] to remove all of the smartweather binding entries then restart. once it starts back up, make sure that you don’t get any errors or messages from the smartweather binding.
5. reinstall the binding (you shouldn’t have to rediscover anything, all of the things will just show “handler missing” until you reinstall the binding jar)

Hope this helps!

Bill

Just an FYI but I’ve just noticed that I’m getting these messages about once/day:

2018-09-06 01:00:50.589 [ERROR] [ather.model.SmartWeatherDeserializer] - Received unknown SmartWeather message type: calibration with content: {"serial_number":"HB-00001121","type":"calibration","value":"Air Calibration received"}

Might be a result of a recent firmware update but they’re not impacting anything.

I switched to the latest snapsht and gettting:

2018-09-08 22:25:03.728 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'EventSubscriber.receive()' on 'org.openhab.binding.weathercalculations.internal.WeatherCalculationsEventSubscriberImpl@eb188': null
java.lang.NumberFormatException: null
        at java.math.BigDecimal.<init>(BigDecimal.java:494) [?:?]
        at java.math.BigDecimal.<init>(BigDecimal.java:383) [?:?]
        at java.math.BigDecimal.<init>(BigDecimal.java:806) [?:?]
        at org.eclipse.smarthome.core.library.types.QuantityType.<init>(QuantityType.java:104) [94:org.eclipse.smarthome.core:0.10.0.oh240M3]
        at org.openhab.binding.weathercalculations.handler.WeatherCalculationsHandler.eventReceived(WeatherCalculationsHandler.java:187) [260:org.openhab.binding.weathercalculations:2.3.0.201808110001]
        at org.openhab.binding.weathercalculations.internal.WeatherCalculationsEventSubscriberImpl.receiveTypedEvent(WeatherCalculationsEventSubscriberImpl.java:77) [260:org.openhab.binding.weathercalculations:2.3.0.201808110001]
        at org.openhab.binding.weathercalculations.internal.WeatherCalculationsEventSubscriberImpl.receiveTypedEvent(WeatherCalculationsEventSubscriberImpl.java:1) [260:org.openhab.binding.weathercalculations:2.3.0.201808110001]
        at org.eclipse.smarthome.core.events.AbstractTypedEventSubscriber.receive(AbstractTypedEventSubscriber.java:54) [94:org.eclipse.smarthome.core:0.10.0.oh240M3]
        at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source) ~[?:?]
        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) [94:org.eclipse.smarthome.core:0.10.0.oh240M3]
        at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [94:org.eclipse.smarthome.core:0.10.0.oh240M3]
        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) [?:?]
2018-09-08 22:25:03.762 [ERROR] [me.core.internal.events.EventHandler] - Dispatching/filtering event for subscriber 'org.eclipse.smarthome.core.events.EventSubscriber' failed: null
java.lang.NumberFormatException: null
        at java.math.BigDecimal.<init>(BigDecimal.java:494) [?:?]
        at java.math.BigDecimal.<init>(BigDecimal.java:383) [?:?]
        at java.math.BigDecimal.<init>(BigDecimal.java:806) [?:?]
        at org.eclipse.smarthome.core.library.types.QuantityType.<init>(QuantityType.java:104) [94:org.eclipse.smarthome.core:0.10.0.oh240M3]
        at org.openhab.binding.weathercalculations.handler.WeatherCalculationsHandler.eventReceived(WeatherCalculationsHandler.java:187) [260:org.openhab.binding.weathercalculations:2.3.0.201808110001]
        at org.openhab.binding.weathercalculations.internal.WeatherCalculationsEventSubscriberImpl.receiveTypedEvent(WeatherCalculationsEventSubscriberImpl.java:77) [260:org.openhab.binding.weathercalculations:2.3.0.201808110001]
        at org.openhab.binding.weathercalculations.internal.WeatherCalculationsEventSubscriberImpl.receiveTypedEvent(WeatherCalculationsEventSubscriberImpl.java:1) [260:org.openhab.binding.weathercalculations:2.3.0.201808110001]
        at org.eclipse.smarthome.core.events.AbstractTypedEventSubscriber.receive(AbstractTypedEventSubscriber.java:54) [94:org.eclipse.smarthome.core:0.10.0.oh240M3]
        at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source) ~[?:?]
        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) [94:org.eclipse.smarthome.core:0.10.0.oh240M3]
        at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [94:org.eclipse.smarthome.core:0.10.0.oh240M3]
        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) [?:?]

Yes, that must be a new message type. I haven’t received this firmware update yet, but I will make a note to exclude these… hopefully this weekend!

Hi,

I’m not getting those errors so we might have to do a little debugging. Can you make sure debug logging is turned on for this binding? To do this, run the following command from your openhab console:

log:set DEBUG org.openhab.binding.weathercalculations

This should cause the calculations binding to describe all of the data that it’s receiving. The next time you get this error, the data that’s changed should be printed before the error, and looks something like this:

[WARN ] [ns.handler.WeatherCalculationsHandler] - Item weatherflowsmartweather_air_HB_00004550_AR_00007413_temperature changed to 67.82 ?F

Since the error you’re getting is coming from the dew point calculation, the thing that’s changed should be temperature or humidity.

You can turn the logging back off by running this command:

log:set DEFAULT org.openhab.binding.weathercalculations

Hi-

I’ve uploaded a new version of the binding that should ignore the calibration messages. Please let me know if you still get the warning messages after updating… I am still running v35 firmware as my hub is on an isolated network. I do have a note to myself to upgrade but I can’t promise I’ll remember to do that!

Best,

Bill

Hi! The recent version does not work for me at all. It does not install.
I’m on OH 2.4 testing.

Hi,

I’ve had some versions refuse to install. I think that the OSGI framework occasionally gets confused: You may need to remove the bundle jar from your adding directory, uninstall the bundle from the openhab command line then restart openhab… once you’ve done that, if you can send any errors you find in the log file, I can hopefully help pinpoint the problem.

I’ll also mention that I don’t generally do much testing on pre-release versions… I’ve only a limited amount of time available and feel it’s best applying that toward making sure things work on final releases. That said, I don’t know of anything that should cause the binding to not work at all on the 2.4 release. So, any logs you can provide will be greatly appreciated!

Bill