Announcing OpenWeatherMap binding for Eclipse SmartHome / openHAB

I implemented the daily forecast min/max ranges (temperature, pressure, humidity, wind speed) and daily sum values (rain, snow) with plain rules and by relying on a strict Item naming convention so I can use lambdas to perform the computations (saves writing lines of code). I use group-based persistence for the OWM Items.

To properly forecast the weather parameters for the current day:

  • use the current values as starting values for min/max
  • include all forecast parameters for which the forecast timestamp fits in the current day

The boundary case where the first forecast is for tomorrow instead of today, is also the only in which the free 12hour (5 day) forecast values can fully be used for generating full-day min/max/sum daily forecasts. Otherwise the 5th day will miss values (those corresponding to the forecast values that fit in the current day).

It would be great if we could use UoM for displaying the min and max values in one range Item, but I don’t think OH supports this.

You can find my experimentation and musings here: OpenWeatherMap daily forecasts with free API using plain OpenHAB rules - #13 by shutterfreak

I still need to correct the forecast calculation for the current day (less trivial due to odd OWM current rain/snow data that always returns 0) and for the boundary case in which the first forecast timeframe (03h) is for the day after the current day (trivial fix).

I expect that computing the total rain and snow of the current day won’t work with OWM as we don’t have access to historic data with a free account, and the current snow/rain values are always zero.