Open Meteo weather forecast

“Ok, which persistence would be the best choice for Openhabian?”

A service which can be installed through the openHABian menu.

Is this still compatible with OH3.4?

I installed your binding but i cant set up a bridge via Browser/GUI (no Discovery). I would create a thing via file but i couldn’t find an example. I’ve tried this

Bridge openmeteo:forecast:test "Bridge(OpenMeteo)"

But got this LOG-Error:

No ThingHandlerFactory found for thing openmeteo:forecast:test (thing-type is openmeteo:forecast). Deferring initialization.

Maybe i don’t understand it correctly. I want to use the free api and i want a 3 Hour Forcast for one Day (now - 3H - 6H -9H - 12H - 15H - 18H - 21H - 24H) with split channels. Is this possible? Thanks for your reply :slight_smile:

Edit: Found this in the LOG-Files:

The marketplace bundle was successfully installed but doesn't start: Could not resolve module: com.obones.binding.openmeteo [292]
  Unresolved requirement: Import-Package: javax.measure; version="[2.2.0,3.0.0)"

My other binding, for the AirZone controller, used to be compatible with v3.4 but this binding, for the weather prediction service OpenMeteo was never compatible as it uses the Time series features that were introduced in v4.

I’m surprised it started in OH3.4 but clearly, it won’t work anyway as it is built against OH 4 and later and so depends on libraries not available in OH3

1 Like

Sorry, my bad! Thanks for the fast reply! Maybe i upgrade to the next version but i don’t have the time atm.

Hi
I have choose the InMemory Persistence. Now I can see one value. The configuration of the persistens to all group member of OpenMeteo_weather_forecast*.
The Timestamp is always NULL. And in Analyse no data. Always the wrong persistence ?

Have you had a look in the openHab log to see if there are any errors reported there?
I’m not sure InMemory supports future time series values, I’m using InfluxDb and it works fine.

Hello,

I try to use this binding.

I am on version openhab:4.3.0.M1 and influxDB 2.17.

The persistance configuration with forecast seams to be ok…

But in the log 1 warning

2024-09-22 09:36:39.511 [WARN ] [ernal.handler.OpenMeteoBridgeHandler] - Unknown channel id time-stamp in weather data

and 1 Error
2024-09-22 09:36:39.515 [ERROR] [org.openhab.core.items.GenericItem ] - Tried to set invalid state in time series org.openhab.core.types.TimeSeries@c7a84dcc on item OpenMeteo_weather_forecast_Observation_Time_Daily of type DateTimeItem, ignoring it

I have an item ‘OpenMeteo_weather_forecast_Minimum_outdoor_temperature_Daily’ and expected automatic new items
OpenMeteo_weather_forecast_Minimum_outdoor_temperature_Daily_Day1, OpenMeteo_weather_forecast_Minimum_outdoor_temperature_Daily_Day2…

I think I saw it for one item in the past…but I do not know to reproduce it…

Any Ideas? Thank you
I expected new items

Hello,

I suspect you have activated a combination of options that I had not thought of, but to confirm that, can you go into the configuration of the weather forecast thing?
Inside this, you have a “code” tab at the top, and it would help me understand the situation if you could send me the list of values below the configuration section:

Copying as text is actually better for me as there are quite a few values here.

Thanks

Hello,

thank you for your help

Here the Persistance config

configurations:
  - items:
      - "*"
    strategies:
      - everyChange
      - restoreOnStartup
    filters: []
  - items:
      - WeatherDataMeteo*
    strategies:
      - forecast
    filters: []
cronStrategies:
  - name: everyMinute
    cronExpression: 0 * * ? * *
  - name: everyHour
    cronExpression: 0 0 * * * ?
  - name: everyDay
    cronExpression: 0 0 0 * * ?
defaultStrategies:
  - restoreOnStartup
  - everyChange
thresholdFilters: []
timeFilters: []
equalsFilters: []
includeFilters: []

Here the code of the item

UID: openmeteo:forecast:9ac291c92b:system
label: OpenMeteo weather forecast
thingTypeUID: openmeteo:forecast
configuration:
  dailyDays: 5
  includeFreezingLevelHeight: false
  includeGustSpeed: true
  minutely15: false
  includeCape: false
  includeDirectNormalIrradiance: false
  includePrecipitation: false
  hourlySplit: false
  includeShowers: false
  includeSunset: true
  includeUVIndex: true
  includeWindSpeed: true
  hourlyHours: 48
  includeDewPoint: true
  dailyTimeSeries: true
  current: true
  includeEvapotranspiration: false
  includeSnowDepth: false
  includeVisibility: true
  includeVapourPressureDeficit: false
  hourlyTimeSeries: true
  includeDaylightDuration: false
  includeHumidity: true
  includeIsDay: false
  dailySplit: false
  includeSunshineDuration: false
  includeShortwaveRadiation: false
  includeWeatherCode: true
  includeSunrise: true
  includeEt0FAOEvapotranspiration: false
  includeTemperature: true
  includeCloudiness: true
  includePressure: true
  includeSnow: true
  includeTimeStamp: true
  minutely15Steps: 48
  includeApparentTemperature: true
  includeRain: true
  includeUVIndexClearSky: false
  includeWindDirection: true
  location: 51.209231458700444,6.849803924560548
  includePrecipitationProbability: true
  includeDirectRadiation: false
  includeDiffuseRadiation: false
bridgeUID: openmeteo:openmeteo:9ac291c92b
channels:
  - id: forecastHourly#time-stamp
    channelTypeUID: openmeteo:time-stamp
    label: Observation Time (Hourly)
    description: Time of data observation
    configuration: {}
  - id: forecastHourly#temperature
    channelTypeUID: system:outdoor-temperature
    label: Outdoor Temperature (Hourly)
    description: Forecast outdoor temperature
    configuration: {}
  - id: forecastHourly#humidity
    channelTypeUID: system:atmospheric-humidity
    label: Atmospheric Humidity (Hourly)
    description: Forecast atmospheric relative humidity
    configuration: {}
  - id: forecastHourly#dew-point
    channelTypeUID: openmeteo:dew-point
    label: Dew-Point Temperature (Hourly)
    description: Forecasted dew-point temperature.
    configuration: {}
  - id: forecastHourly#apparent-temperature
    channelTypeUID: openmeteo:apparent-temperature
    label: Apparent Temperature (Hourly)
    description: Forecast apparent temperature.
    configuration: {}
  - id: forecastHourly#pressure
    channelTypeUID: system:barometric-pressure
    label: Barometric pressure (Hourly)
    description: Forecast barometric pressure
    configuration: {}
  - id: forecastHourly#cloudiness
    channelTypeUID: openmeteo:cloudiness
    label: Cloudiness (Hourly)
    description: Forecast cloudiness.
    configuration: {}
  - id: forecastHourly#wind-speed
    channelTypeUID: system:wind-speed
    label: Wind speed (Hourly)
    description: Forecast wind speed
    configuration: {}
  - id: forecastHourly#wind-direction
    channelTypeUID: system:wind-direction
    label: Wind direction (Hourly)
    description: Forecast wind direction
    configuration: {}
  - id: forecastHourly#gust-speed
    channelTypeUID: openmeteo:gust-speed
    label: Gust speed (Hourly)
    description: Forecast gust speed.
    configuration: {}
  - id: forecastHourly#snow
    channelTypeUID: openmeteo:snow
    label: Snow (Hourly)
    description: Snow volume of the last hour.
    configuration: {}
  - id: forecastHourly#precipitation-probability
    channelTypeUID: openmeteo:precipitation-probability
    label: Precipitation Probability (Hourly)
    description: Forecast precipitation probability.
    configuration: {}
  - id: forecastHourly#rain
    channelTypeUID: openmeteo:rain
    label: Rain (Hourly)
    description: Rain volume of the last hour.
    configuration: {}
  - id: forecastHourly#weather-code
    channelTypeUID: openmeteo:weather-code
    label: WMO code (Hourly)
    description: Weather condition as a numeric code. Follow WMO weather
      interpretation codes.
    configuration: {}
  - id: forecastHourly#visibility
    channelTypeUID: openmeteo:visibility
    label: Visibility (Hourly)
    description: Current visibility.
    configuration: {}
  - id: forecastDaily#time-stamp
    channelTypeUID: openmeteo:time-stamp
    label: Observation Time (Daily)
    description: Time of data observation
    configuration: {}
  - id: forecastDaily#temperature-min
    channelTypeUID: system:outdoor-temperature
    label: Minimum outdoor temperature (Daily)
    description: Forecast minimum outdoor temperature
    configuration: {}
  - id: forecastDaily#temperature-max
    channelTypeUID: system:outdoor-temperature
    label: Maximum outdoor temperature (Daily)
    description: Forecast maximum outdoor temperature
    configuration: {}
  - id: forecastDaily#apparent-temperature-min
    channelTypeUID: openmeteo:apparent-temperature
    label: Minimum apparent temperature (Daily)
    description: Forecast minimum apparent temperature.
    configuration: {}
  - id: forecastDaily#apparent-temperature-max
    channelTypeUID: openmeteo:apparent-temperature
    label: Maximum apparent temperature (Daily)
    description: Forecast maximum apparent temperature.
    configuration: {}
  - id: forecastDaily#rain-sum
    channelTypeUID: openmeteo:rain
    label: Rain (Daily)
    description: Rain volume for the day
    configuration: {}
  - id: forecastDaily#snow-sum
    channelTypeUID: openmeteo:snow
    label: Snow (Daily)
    description: Snow volume for the day
    configuration: {}
  - id: forecastDaily#precipitation-probability-max
    channelTypeUID: openmeteo:precipitation-probability
    label: Maximum precipitation probability (Daily)
    description: Forecast maximum precipitation probability.
    configuration: {}
  - id: forecastDaily#precipitation-probability-min
    channelTypeUID: openmeteo:precipitation-probability
    label: Minimum precipitation probability (Daily)
    description: Forecast minimum precipitation probability.
    configuration: {}
  - id: forecastDaily#precipitation-probability-mean
    channelTypeUID: openmeteo:precipitation-probability
    label: Mean precipitation probability (Daily)
    description: Forecast mean precipitation probability.
    configuration: {}
  - id: forecastDaily#weather-code
    channelTypeUID: openmeteo:weather-code
    label: WMO code (Daily)
    description: Weather condition as a numeric code. Follow WMO weather
      interpretation codes.
    configuration: {}
  - id: forecastDaily#sunrise
    channelTypeUID: openmeteo:sunrise
    label: Sunrise (Daily)
    description: Sunrise time
    configuration: {}
  - id: forecastDaily#sunset
    channelTypeUID: openmeteo:sunset
    label: Sunset (Daily)
    description: Sunset time
    configuration: {}
  - id: forecastDaily#wind-speed
    channelTypeUID: system:wind-speed
    label: Wind speed (Daily)
    description: Forecast maximum wind speed
    configuration: {}
  - id: forecastDaily#gust-speed
    channelTypeUID: openmeteo:gust-speed
    label: Gust speed (Daily)
    description: Forecast maximum gust speed.
    configuration: {}
  - id: forecastDaily#wind-direction
    channelTypeUID: system:wind-direction
    label: Wind direction (Daily)
    description: Forecast dominant wind direction
    configuration: {}
  - id: forecastDaily#uv-index
    channelTypeUID: openmeteo:uv-index
    label: UV index (Daily)
    description: Daily maximum in UV Index starting from 0
    configuration: {}
  - id: current#time-stamp
    channelTypeUID: openmeteo:time-stamp
    label: Observation Time (Current)
    description: Time of data observation
    configuration: {}
  - id: current#temperature
    channelTypeUID: system:outdoor-temperature
    label: Outdoor Temperature (Current)
    description: Forecast outdoor temperature
    configuration: {}
  - id: current#humidity
    channelTypeUID: system:atmospheric-humidity
    label: Atmospheric Humidity (Current)
    description: Forecast atmospheric relative humidity
    configuration: {}
  - id: current#apparent-temperature
    channelTypeUID: openmeteo:apparent-temperature
    label: Apparent Temperature (Current)
    description: Forecast apparent temperature.
    configuration: {}
  - id: current#rain
    channelTypeUID: openmeteo:rain
    label: Rain (Current)
    description: Rain volume of the last hour.
    configuration: {}
  - id: current#snow
    channelTypeUID: openmeteo:snow
    label: Snow (Current)
    description: Snow volume of the last hour.
    configuration: {}
  - id: current#weather-code
    channelTypeUID: openmeteo:weather-code
    label: WMO code (Current)
    description: Weather condition as a numeric code. Follow WMO weather
      interpretation codes.
    configuration: {}
  - id: current#cloudiness
    channelTypeUID: openmeteo:cloudiness
    label: Cloudiness (Current)
    description: Forecast cloudiness.
    configuration: {}
  - id: current#pressure
    channelTypeUID: system:barometric-pressure
    label: Barometric pressure (Current)
    description: Forecast barometric pressure
    configuration: {}
  - id: current#wind-speed
    channelTypeUID: system:wind-speed
    label: Wind speed (Current)
    description: Forecast wind speed
    configuration: {}
  - id: current#wind-direction
    channelTypeUID: system:wind-direction
    label: Wind direction (Current)
    description: Forecast wind direction
    configuration: {}
  - id: current#gust-speed
    channelTypeUID: openmeteo:gust-speed
    label: Gust speed (Current)
    description: Forecast gust speed.
    configuration: {}

One of the items

Thanks for the details. There is this in the configuration:

dailyTimeSeries: true

This means the thing will create a group for forecast channels using the persistence system to store future values.

There is also this:

dailySplit: false

which means creating one channel group per future day is disabled. If set to true, it will create a channel group per future day and was the only way to create future values in earlier versions of openHAB.

This explains the situation you described:

On top of that there is also this in the configuration:

includeTimeStamp: true

This is a relatively new option that indicates there should be a channel with the future time for which a forecast applies and this only makes sense in “split mode”. Considering you are not using this mode, you are totally safe to set it to false, via the associated toggle on the config page.
This should make the errors you see in the log disappear.

I’ll also investigate why these errors come to exist and will keep you posted.

Hi,

thank you for the resposne, but I don’t have it yet.

I have the newest Version of open hub, I need Items for future values and want to use the “automatic” generation of time series items…

How should i configure it ?

Times series is a new concept introduced in OH4 which means you only have one channel that contains data for all future days: temperature_daily
In past versions, this was not available and so weather forecast bindings created one channel per future day: temperature_today, temperature_tomorrow, temperature_day2, … temperature_dayN

If you only want the “day1, day2” channels and link items to them, then you should do this:

dailyTimeSeries: false
dailySplit: true

And doing so, you won’t even get the issue that you discovered with dailyTimeSeries: true and includeTimeStamp: true

To all:

I have just published version 0.2.1 that fixes the issue with “Observation time in split channel groups” being wrongly applied to time series channels.

To update, you must remove the binding and add it back. This process is required until someone offers a more automatic solution inside openHAB, pull requests are much welcome.

I tried the new version 0.2.1 and tried to use the the timeseries (new style)…the Error is gone, but now items were generated for day1 day2 and so on…

So I will switch to the old way with splitted channels…

Yes, the timeseries mode creates one channel per metric, to which you assign one item. That item has “future” values in its persisted data on top of the usual past values. And then to display that, you need specific widgets/code that reads the persisted future data.
I believe that’s the last point that is not yet readily available so if you are expecting one item per future day, only the “legacy split mode” is currently of use to you.

Hi,

There are a lot of weather widgets based on openWeatherMap. Any Idea how to convert the WMO code (+ day/night) to get the right icon like at openWeather API ? Thank you

Hello,

I believe this work has already been done here: WMO weather interpretation code descriptions (& images) · GitHub

Hello,

yes I found that too, but How to built it in…with an Transformation, rule or modifiiing the widgets …?

Hi @obones,

I just came across the Open Meteo API. I’m highly interested in the Solar Radiation Variables, specifically “Global Tilted Irradiance GTI (Instant)” for solar energy forecast. Those seem not (yet) supported by your binding. Any chance to get that added?

Thanks & Happy Holidays!

1 Like