Since the update to OH 4.2, I notice that the OpenWetherMap doesn’t update automatically.
I changed to the API version 3 some time ago, so that should be OK.
When I disable and re-esable the local forecast, I see one update, but then it stops.
Anyone experiencing similar issue?
I can also see a warning, not sure if it is connected to the problem.
2024-07-27 21:58:26.491 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: Cannot invoke "org.openhab.binding.openweathermap.internal.dto.onecall.Current.getDt()" because the return value of "org.openhab.binding.openweathermap.internal.dto.OpenWeatherMapOneCallHistAPIData.getCurrent()" is null
at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapOneCallHistoryHandler.updateHistoryCurrentChannel(OpenWeatherMapOneCallHistoryHandler.java:139) ~[?:?]
at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapOneCallHistoryHandler.updateChannel(OpenWeatherMapOneCallHistoryHandler.java:108) ~[?:?]
at org.openhab.binding.openweathermap.internal.handler.AbstractOpenWeatherMapHandler.updateChannels(AbstractOpenWeatherMapHandler.java:165) ~[?:?]
at org.openhab.binding.openweathermap.internal.handler.AbstractOpenWeatherMapHandler.updateData(AbstractOpenWeatherMapHandler.java:136) ~[?:?]
at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapAPIHandler.updateThing(OpenWeatherMapAPIHandler.java:186) ~[?:?]
at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapAPIHandler.updateThings(OpenWeatherMapAPIHandler.java:176) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:840) [?:?]
2024-07-27 21:58:26.879 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: Cannot invoke "org.openhab.binding.openweathermap.internal.dto.onecall.Current.getDt()" because the return value of "org.openhab.binding.openweathermap.internal.dto.OpenWeatherMapOneCallHistAPIData.getCurrent()" is null
at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapOneCallHistoryHandler.updateHistoryCurrentChannel(OpenWeatherMapOneCallHistoryHandler.java:139) ~[?:?]
at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapOneCallHistoryHandler.updateChannel(OpenWeatherMapOneCallHistoryHandler.java:108) ~[?:?]
at org.openhab.binding.openweathermap.internal.handler.AbstractOpenWeatherMapHandler.updateChannels(AbstractOpenWeatherMapHandler.java:165) ~[?:?]
at org.openhab.binding.openweathermap.internal.handler.AbstractOpenWeatherMapHandler.updateData(AbstractOpenWeatherMapHandler.java:136) ~[?:?]
at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapAPIHandler.updateThing(OpenWeatherMapAPIHandler.java:186) ~[?:?]
at org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapAPIHandler.lambda$2(OpenWeatherMapAPIHandler.java:145) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:840) [?:?]
All I can really say is it’s worked for me flawlessly through the upgrade and the warning does indeed look relevant. It seems like it can’t get anything from the history endpoint of the API. Are us using the history Thing? If you disable that Thing does local forecast start working or does the warning change?
Finally, when posting anything to the forum that has a “Code” tab in MainUI, please click on the code tab and post the text you find there. Use code fences.
```
code goes here
```
Screen shots are never complete, cannot be searched, copy/paste/edit, etc. Be sure to redact sensitive info from the text where appropriate.
Thanks, seems like a problem in my thing text configuration, the channels had different links.
I created the things from UI and it works.
I will look in more details in the weekend.
I use fences. Maybe something else is wrong.
Here’s the screenshot (I know it’s not searchable but only way to prove I guess )
I almost never use the Main UI configuration so I didn’t figure out that I need to copy the code of the Main UI configuration tab of the thing.
I will keep that in mind
Yes the character are “back ticks” in the original post, I was writing my answer from my phone and I even didn’t notice the difference.
Below is another screenshot from the original post in edit mode
The text on my display is shown formatted, see screenshot in my previous post
Hi,
I am on openHAB 4.2.0 and have a problem with the openweathermap binding.
changed api account from 2.5 to 3.0 => OpenWeatherMap Account is online.
But my Local Weather and Forecast (One Call API) thing gives me this error : Status:
OFFLINE
CONFIGURATION_ERROR
Invalid API key. Please see h ttps://openweathermap.org/faq#error401 for more info.
Have removed old binding and used the latest 4.3.0 jar in addons
I use the free plan who was working before until 06/2024 as the 2.5 stopped
read the faq#error 401 and do not find why i receive this error.
Did you sign up for the new API and get a new API access key? The old 2.5 API does not automatically transfer to 3.0. You have to reapply and sign up for the 3.0 API on the OWM site.
I logged on my openweathermap account and regenerated the api key.
Copied the key to the openhab binding and after a few seconds, got the green online;
No, the free plan is still free up to 1000 cals per day. But they require payment info in case you go over your daily limit on the free plan. You cannot sign up even for the free plan without giving them payment info but if you stay within your limit they never charge you.
But this was also the case a few years ago for the 2.5 API. As long as I’ve used OWM they’ve always required payment info to sign up.