Weatherflow Smart Weather Station binding


(Bogumil J.) #103

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!


(Bill Welliver) #104

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.


(Bogumil J.) #105

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


(Bill Welliver) #106

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.


(Bogumil J.) #107

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!


(Bill Welliver) #108

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.


(Bill Welliver) #109

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.


(Bogumil J.) #110

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) [?:?]

(Bill Welliver) #111

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


(Sjcliffe) #112

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.


(Bogumil J.) #113

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) [?:?]

(Bill Welliver) #114

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!


(Bill Welliver) #115

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


(Bill Welliver) #116

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


(Bogumil J.) #117

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


(Bill Welliver) #118

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


(Bogumil J.) #119

Hi Bill,
I’ve tried it already. I even reinstalled openhab completly (for different reason).
It looks like the binding exists on the bundle:list, however it does not show up in PaperUI on Bindings list.
Also none of WF devices are being find and added to Inbox.


(Bill Welliver) #120

If the bundle is still in the bundle list after you bundle:uninstall it and have made sure you don’t have a copy of the jar sitting in a directory somewhere, there’s a problem with openhab- probably a stray reference somewhere inside of OSGI… especially if you see no indication of it being loaded in the log files. Incidentally, what does the line in the bundle list look like?


(Bogumil J.) #121

This is what I get in log:

2018-10-04 19:59:10.327 [ERROR] [nhab.binding.weatherflowsmartweather] - FrameworkEvent ERROR - org.openhab.binding.weatherflowsmartweather
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.weatherflowsmartweather [286]
  Unresolved requirement: Import-Package: org.eclipse.smarthome.automation

        at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
        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) [?:?]

(Bill Welliver) #122

I think this is caused by a new dependency. I’ve started adding support for triggers on events like “rain started” and I think that’s what this error is being caused by. To resolve it, you should be able to go into PaperUI -> Addons -> Misc, and install the “Experimental Rules Engine”. Once you do that, the dependency should be automatically resolved. If you’ve removed the weather flow binding, you might have to re-add it to the adding folder, but if not, it should start up automatically.

As for the triggers, that’s still a work in progress so I won’t say any more about it until it’s actually useful. Stay tuned for updates on that.

Bill