Openweather-API OneCall stops after several days with Exception


I added the OpenWeatherMap#OneCallApi to my OH3.1 installation.
Things are online, Item get’s updated. All works correctly.
After several days the update stops. In the Logs I’ve discovered an exception

2021-08-20 19:03:52.214 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
        at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapOneCallHandler.updateMinutelyForecastChannel( ~[?:?]
        at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapOneCallHandler.updateChannel( ~[?:?]
        at org.openhab.binding.openweathermap.internal.handler.AbstractOpenWeatherMapHandler.updateChannels( ~[?:?]
        at org.openhab.binding.openweathermap.internal.handler.AbstractOpenWeatherMapHandler.updateData( ~[?:?]
        at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapAPIHandler.updateThing( ~[?:?]
        at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapAPIHandler.updateThings( ~[?:?]
        at java.util.concurrent.Executors$ ~[?:?]
        at java.util.concurrent.FutureTask.runAndReset( ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
        at java.util.concurrent.ThreadPoolExecutor$ [?:?]
        at [?:?]

Except the OpenweatherApi-Items all other Things/Items works correctly.

Manual Workaround:

  • disable Bridge Thing by UI
  • enabled Bridge Thing again by UI
  • all works again for several days

Platform information:

  • Docker Image openhab/3.1.0
  • OS: linux

Any ideas or thoughts?
Many thanks!


It looks like in rare cases openweathermap does not deliver minutely forecast data in the API response, and this is not handled properly by the code. I added a null pointer check for that case; find a test version at

I don’t know whether it is easy (or even possible) to test this with the docker image. If it is, I would be glad if you could test it. If it isn’t, I can test it for you, but I need your openweathermap config for this, especially the location and the minutely things you defined, as this is where the error occurs.

Yours sincerely


Hi Wolfgang, many thanks for looking into it.

Sure I can test the fix on my installation. Problem is, that I’m running the last stable release, 3.1.
Could you provide the fix for the 3.1? That would be awesome.

Kind Regards,

I did the NPE-fix myself on base of the 3.1.0 branch.
…now testing.

ok, after nearly a month, no problem occured with the fix. so it works fine.

Dear @ehora , sorry for staying silent for so long!

I was busy first, then I saw you already did the fix yourself. Many thanks for that! Do you plan to open a PR with the fix?



Hi @Wolfgang1966, no problem.

PR is already opened:
It’s my first for OpenHAB. Can you check? Is something missing?

Many thanks!

Thanks for your contribution. I reviewed your PR and approved it. Now lets wait for a second approval and merge….