Weatherflow Smart Weather Station binding


(Klim Bim) #90

Hey all, I am very excited to order a sky sensor hopefully in some days, when they are rolling out the new sensor. Is this binding already available? Thanks a lot for the great work so far!!!


(Bogumil J.) #91

Hi, the binding is available and works pretty good at this stage, however it is still in continuous development/testing phase. We are all waiting for our Sky’s in order to verify if it works appropriately with it. Then there will be required more test and the binding will be hopefully released shortly officially.


(Bill Welliver) #92

Hi,

The binding is available and supports the Hub and Air sensors. The latest version is available from a link earlier in this message thread. I began laying the ground work to support the Sky sensor but I think it’s almost certain that additional effort will be required to make it work properly.

My Sky is currently making its way through the terminal at Hong Kong International airport… probably be about a week before it arrives. I will be out of town until mid-June, but getting the binding working with the Sky is a top priority upon my return. I’d conservatively estimate that the binding should support the Sky by the end of June (but hopefully before then!)


(Ewan Fleming) #93

Bill, are you from Weatherflow? My feedback would be for Weatherflow to support MQTT - it would make the need for a specific binding redundant for many OpenHAB users.


(Bill Welliver) #94

Hi,

I’m an independent user unaffiliated with Weatherflow, though I can tell you that the Hub does use MQTT to communicate with the Weatherflow cloud service.

While I do like MQTT, I think that having a native binding provides a better out of the box experience, especially for less technically savvy folks.

If someone wanted to have a go at integrating without a native binding, I’m pretty sure the way to go would be to listen to the UDP broadcasts from the Hub using the TCP/UDP binding, and then use a transformation to get the data out of the JSON data being broadcast.

Bill


(Bill Welliver) #95

Hi All,

I received my Sky and spent some time last night adding support for the new observations supplied by this sensor package. You can download the latest build here:

https://bitbucket.org/hww3/org.openhab.binding.weatherflowsmartweather/downloads/org.openhab.binding.weatherflowsmartweather-2.3.0-SNAPSHOT.jar

It seems to work properly for me; I look forward to hearing from others! Note: you’ll need to be running Openhab 2.3.0 to use this without getting random errors.

Some to do items:

  • support the Rain start, Rapid wind and Lighting strike events. I still am unsure the best way to represent these messages; perhaps as a generic JSON events channel that others can then listen to and update their UIs as desired?

  • I’d also like to add support of the new units framework in Openhab 2.3. No eta on this but it’s near the top of my list.


(Sjcliffe) #96

Thanks Bill. I’ve just upgraded and my Sky observations seem to be coming in fine.


(Sjcliffe) #97

Okay, so I’ve just had some nice heavy showers but only the rain_accumulated item is being updated, not the local_day_rain_accumulation item:

2018-06-19 12:45:27.867 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.0 to 0.009579
2018-06-19 12:46:27.926 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.009579 to 0.016071
2018-06-19 12:47:27.867 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.016071 to 0.003801
2018-06-19 12:48:27.849 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.003801 to 4.066342
2018-06-19 12:49:28.015 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 4.066342 to 2.570136
2018-06-19 12:50:27.807 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 2.570136 to 1.006456
2018-06-19 12:51:27.829 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 1.006456 to 0.150633
2018-06-19 12:52:27.759 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.150633 to 0.04064
2018-06-19 12:53:27.768 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.04064 to 0.121903
2018-06-19 12:54:27.734 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.121903 to 0.385776
2018-06-19 12:55:27.793 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.385776 to 0.313365
2018-06-19 12:56:27.791 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.313365 to 0.101144
2018-06-19 12:57:27.785 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.101144 to 0.013289
2018-06-19 12:58:27.666 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.013289 to 0.021957
2018-06-19 12:59:27.688 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.021957 to 0.025707
2018-06-19 13:00:27.646 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.025707 to 0.00955
2018-06-19 13:01:27.704 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.00955 to 0.016617
2018-06-19 13:02:27.633 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.016617 to 0.007092
2018-06-19 13:03:27.644 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.007092 to 0.003274
2018-06-19 13:04:27.700 [vent.ItemStateChangedEvent] - weatherflowsmartweather_sky_HB_00001121_SK_00011302_rain_accumulated changed from 0.003274 to 0.0

I’m assuming this is something that is calculated by the binding as it’s not reported by the UDP API.

Also, what is precipitation type item as it’s not in the UDP API either and I didn’t see it set or updated during this rain event?

Thanks!


(Sjcliffe) #98

I found the answer to my first question here - https://community.weatherflow.com/t/udp-accumulated-rain-field-11-null/342


(Bill Welliver) #99

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.


(Bill Welliver) #100

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


(Sjcliffe) #101

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


(Bill Welliver) #102

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


(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.