Open Meteo weather forecast

I have just published the initial release of my Open Meteo binding on the marketplace.
It currently provides the daily and hourly forecast as a time series by default but you can activate “split channels” like what was used to be done before OH 4.1

The Readme will give you a detailed list of all the available channels.

This discussion is here to allow for feedback and suggestions.

Next steps will be (in no particular order):

  • implement discovery to add a weather forecast for the globally set location
  • implement the 15 -Minutely weather forecast
  • implement air quality forecast
  • implement marine forecast
  • allow specifying the model(s) to be used for forecasts.
  • implement Solar irradiation detailed channels
  • implement a WMO to openweathermap transformation

Unless a very detailed reason is given, new forecasts will only be available as time series.

I do have one question regarding the 15-Minutely forecast:
Its values are retrievable with the same API call that currently gives the hourly and daily forecast. Instinctively, I would add this as (yet) another channel group on the existing forecast thing. Would that be acceptable?
It limits the number of calls to the API as creating another thing just for it would double the number of calls to the API and thus count towards the daily limit for free usage.

The question does not apply air quality and marine as they both require a different API call.

2 Likes

Version 0.1.0 is out with a current weather channel group, a 15 minutely weather forecast channel group
and a discovery service that auto creates a forecast thing for the system location.

Following recommendations for clarity in the MainUI, the channels are now suffixed with the name of the channel group they belong to.

Hello @obones,

thanks for this binding - but I have problems to use it.

I don’t have a Open Meteo subscription and want to use the free API. I successfully installed the “Open Meteo Bridge” thing and the automatic discovery found my location data and I’ve created the “OpenMeteo weather forecast” thing out of this discovery. Both are showing “online” status.
As a first test, I’ve tried to create items for the channels “UV index (Daily)” and “Cloudiness (Hourly)” but both are showing NULL as values and gets never updated. This does not change (I’ve double checked 1 day later after installation). I’ve just re-installed everything, but it’s the same behavior.

Do I need to do something else?

The logfile shows only the successful discovery in a single line, no warnings, no errors (with default logging options):

2024-05-13 07:18:11.644 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘openmeteo:forecast:32a5baf861:system’ to inbox.

Thanks in advance,
Frank

Have you applied the “forecast” strategy to your items, as described here?

Without it, the timeseries items are never accessible.

Also, please note that if you apply a strategy to some items, the “default strategy” will no longer apply and you’ll need to create a “catch all” strategy yourself, as discussed here

Thanks a lot for your help!

At the beginning I didn’t understand to exact steps how to configure the strategy for the forecast channels. Now it works, at least for the Cloudiness (Hourly). The current cloudiness factor is shown as the item value and the Analyze will show the diagram for the future.

For the UV Index (Daily) I still get NULL as the current value for the item. However, if I choose Analyze I can see today’s and future UV data as a graph. Shouldn’t the current UV index from today also be displayed as the current value of the item, just like it is with cloud cover?

I believe daily forecast items see their value updated once a day. At least that’s what I saw during development after having let my development instance run overnight.

Ok, I think I just should wait a day longer and will see if the current item value will have changed tomorror (or during today).

Thanks for your help and this binding!

Ok, after waiting a while the value of the UV index item changed from NULL to the current (daily) value!

It works great! Thanks!

@obones, thank you for a great work. Could you please prompt me:

  1. Is it possible to determinate the last time the forecast data were received?
  2. I am trying to replace OpenWeatherMap and hourly split mode seems suitable for it. But I can’t understand the way the values was obtained. For example, the forecast has been updated at 6:32, what value of outdoor temperature is set in “Hour1” item? At 7:00? At 8:00? Calculated by the plugin?

Hello,

  1. This is only known internally but I could place it in a thing property quite easily. Or maybe a thing channel is more appropriate?
  2. From what I can see in OpenMeteo output, it’s giving me all hours starting at midnight on the day the request was made. So Hour1 is always from midnight to one in the morning. I see that OpenWeatherMap has timestamp channels in its split groups, I could add that in a future version so that you will get the value.

Thank you for the answer. I’m looking forward for the changes. And I think you should change this as well:

Whether to create one channel group per future hour to accommodate widgets that are not capable of using time series.

If I got it right it would be in a past in my example.

And it looks very strange that OpenMeteo changing forecast for the past…

2024-06-30 10:39:04.019 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WeatherAndForecast2_Hour03_OutdoorTemperature' changed from 21.5415 °C to 22.3915 °C
2024-06-30 11:39:04.226 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WeatherAndForecast2_Hour03_OutdoorTemperature' changed from 22.3915 °C to 23.0915 °C
2024-06-30 12:39:04.445 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WeatherAndForecast2_Hour03_OutdoorTemperature' changed from 23.0915 °C to 23.491499 °C
2024-06-30 13:39:04.619 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WeatherAndForecast2_Hour03_OutdoorTemperature' changed from 23.491499 °C to 23.5915 °C
2024-06-30 15:39:05.041 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WeatherAndForecast2_Hour03_OutdoorTemperature' changed from 23.5915 °C to 23.491499 °C
2024-06-30 16:39:05.255 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WeatherAndForecast2_Hour03_OutdoorTemperature' changed from 23.491499 °C to 23.0915 °C

Well, I could change it so that Hour1 is always the next hour as OpenMeteo provides for a “start_hour” parameter.
What I’d like, though, is to be consistent with what the OpenWeatherMap binding is doing. Do you know what’s inside the Hour1 channel group?

It not so easy to answer. Please, look at it:

2024-07-03 18:57:40.458 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WeatherAndForecast_Current_ObservationTime' changed from 2024-07-03T17:57:39.000+0300 to 2024-07-03T18:57:40.000+0300
2024-07-03 18:57:40.491 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WeatherAndForecast_ForecastHours03_ForecastTime' changed from 2024-07-03T18:00:00.000+0300 to 2024-07-03T21:00:00.000+0300
2024-07-03 18:57:40.520 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WeatherAndForecast_ForecastHours06_ForecastTime' changed from 2024-07-03T21:00:00.000+0300 to 2024-07-04T00:00:00.000+0300
2024-07-03 18:57:40.552 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WeatherAndForecast_ForecastHours09_ForecastTime' changed from 2024-07-04T00:00:00.000+0300 to 2024-07-04T03:00:00.000+0300

I use “3 Hour Forecast”. It includes weather forecast data with 3-hour step. It is a forecast, all the data are in future (or for current time).

Version 0.2.0 has been published, both at GitHub and in the marketplace

I should fix the issues mentioned here along with better documentation and a brand new “Air quality” thing

It looks very strange, but I still can’t update the binding from marketplace. OH shows version 0.1 there.

I removed and added the binding back. It helped. Now I can add observation time. Thanks a lot.

Hi, unfortunately, I’m also stuck. I actually followed all the instructions as described. Openhabian 4.2.1, current OM 4.1.0.0, 5.0.0.0 persistence.rrd4j with forecast strategy using OpenMeteo forecast group, but all channels show zero. The logs don’t report any errors. The bridge shows a current update time."

OK, after create the channels new this warn occurs:

2024-08-25 21:23:28.635 [WARN ] [ernal.handler.OpenMeteoBridgeHandler] - Unknown channel id time-stamp in weather data

all data will be sent.

2024-08-25 21:23:28.688 [INFO ] [openhab.event.ItemTimeSeriesEvent   ] - Item 'OpenMeteo_weather_forecast_Atmospheric_Humidity_Hourly' shall process timeseries [Entry[timestamp=2024-08-25T18:00:00Z, state=60 %], Entry[timestamp=2024-08-25T19:00:00Z, state=62 %], Entry[timestamp=2024-08-25T20:00:00Z, state=70 %], Entry[timestamp=2024-08-25T21:00:00Z, state=73 %], Entry[timestamp=2024-08-25T22:00:00Z, state=67 %], Entry[timestamp=2024-08-25T23:00:00Z, state=70 %], Entry[timestamp=2024-08-26T00:00:00Z, state=70 %], etc

then the error occurs

2024-08-25 21:23:28.762 [ERROR] [org.openhab.core.items.GenericItem  ] - Tried to set invalid state in time series org.openhab.core.types.TimeSeries@699ce6a5 on item OpenMeteo_weather_forecast_Observation_Time_Hourly of type DateTimeItem, ignoring it

so i think the persistence don’t work ? right ?

You can’t use rrd4j with forecast.