Openweathermap and Weather Warnings not working

Hi folks,

I hope you can help me. I’m testing the Openweathermap binding, to see if it can share the alerts for my region. Unfortunately, in facts, Meteoalarm changed in the last few months, so my previous solution with http binding is not working anymore.

Everything’s working fine, except the Weather Warnings apparently :frowning:

here my items:

String OpenWeatherMap_Alerts1_Event         "[%s]"                                      (gWeather)                                 { channel="openweathermap:onecall:api:local:alerts1#event" }
String OpenWeatherMap_Alerts1_Description   "[%s]"                                      (gWeather)                                 { channel="openweathermap:onecall:api:local:alerts1#description" }
DateTime OpenWeatherMap_Alerts1_Onset       "[%1$td/%1$tm - %1$tH:%1$tM]"               (gWeather)                                 { channel="openweathermap:onecall:api:local:alerts1#onset" }
DateTime OpenWeatherMap_Alerts1_Expires     "[%1$td/%1$tm - %1$tH:%1$tM]"               (gWeather)                                 { channel="openweathermap:onecall:api:local:alerts1#expires" }
String OpenWeatherMap_Alerts1_Source        "[%s]"                                      (gWeather)                                 { channel="openweathermap:onecall:api:local:alerts1#source" }

and here my things file:

Bridge openweathermap:weather-api:api "OpenWeatherMap Account" @ "Accounts" [apikey="xxxxxxxxxxxxxxxxxxxxx", refreshInterval=10, language="en"] {
    Thing onecall local "Weather And Forecast - Local" @ "Outdoor" [location="xx.465051,xx.094615", forecastHours=24, forecastDays=6, numberOfAlerts=5]

Not sure what I’m missing but I have always a UNDEF value for each item. But if I try to check via a normal http request (like: I can see data in eg. alerts.0.event


  1. where is my mistake? it seems I’m following correctly what is stated in OpenWeatherMap - Bindings | openHAB

  2. I see the “event” is reporting something like “Yellow Thunderstorm Warning”. What about split the info coming from that field in two fields, one the event “Thunderstorm” and the second the level of warning “yellow/2”?

Thanks for your support on this.
Not sure who is the maintainer of this fantastic binding, but thanks for everything


edit: @cweitkamp Christoph are you the maintainer of openweathermap?

There’s a setting in the OneCall API to retrieve the alerts. It defaults to 0. The maximum value you can set for this setting is 5.

If you set it to a nonzero value, then the OpenWeatherMap binding will be able to return alerts. These will show up in the channels of the binding. Keep in mind that you will have to restart openHAB in order for the binding to successfully pick up this change (or the OneCall API Thing will remain in UNKNOWN state).

Hint:; if you see no “alert” channels, it most likely means that your configuration disabled alerts…

EDIT: when alerts occur, I see that the binding returns sometimes contradictory alerts. I am unsure whether this is due to OpenWeatherMap OneCall API or the binding. For instance, we’re currently under a heat alert and for today I get a yellow and an orange heat wave alert message type…

1 Like