OpenWeatherMap - One Call Api - No connection

Hello,

I want to use the new possibilities of OpenWeatherMap with the One Call APi and have installed the binding 2.5.10 and have copied the example files from here
[https://github.com/Wolfgang1966/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.openweathermap]

My file owm.things:

Bridge openweathermap:weather-api:api "OpenWeatherMap Account"     [apikey="myapikey", refreshInterval=10, language="de"] {
     Thing weather-and-forecast local "Local Weather And Forecast" [location="mylocation", forecastHours=24, forecastDays=0]
}

Bridge openweathermap:weather-api:api "OpenWeatherMap Account" [apikey="myapikey", refreshInterval=10, language="de"] {
    Thing onecall local "Local Weather and Forecast" [location="mylocation"]
}

The first bridge with the old api is working, the new one doesn’t.

My weather.items file:

...
String localTomorrowCondition  "Condition [%s]" <sun_clouds>                                                { channel="openweathermap:onecall:api:local:forecastTomorrow#condition" }
...

Event.log shows:

'openweathermap:weather-api:api' changed from UNINITIALIZED to INITIALIZING
'openweathermap:weather-api:api' changed from INITIALIZING to UNKNOWN
'openweathermap:weather-api:api' changed from UNKNOWN to OFFLINE

Any suggestions?

Greetings

You have defined to bridges with the same name „api“, that‘s not possible.

This should only show the two versions I have tried. I used them each one for myself.

After reinstalling the binding I now have a connection to the openweathermap:weather-and-forecast channels in the Paper UI.
But how can I configure a One Call Api access? Is it even possible to do this via the Paper UI? I think not.

It was a misunderstanding. The current binding 2.5.10 does NOT support One Call Api. You need version 2.5.9 (or 3.0.0 for OH3) from here:
[https://home.klimt.de/owncloud/index.php/s/Y7P4mWfXJs7iWNW]
Then it works.

My installation pulled openweathermap - 2.5.12.SNAPSHOT. However, I cannot bring the bridge with the onecall thing up and running. Does 2.5.12 also not support onecall?

P.S.: Could you please add this limitation to the documentation (OpenWeatherMap - Bindings | openHAB), it would really ease the situation for many people?

Top left of the browser screen “version: latest”
Which today pulls up version 3.x of course.
Version 2.5 users can select 2.5 from the dropdown, that doc describes what’s available and does not include One Call.

Notes about what 2.5 can do would not be appropriate in 3.x docs.

Hello @reichel, I developed the onecall part of the openweathermap binding, so I can ensure that the 2.5.x version does not support the onecall API and most proably never will. I originally opened a PR against 2.5.x but it was not approved early enough to make it into what was at that time believed to be the last 2.5 version. Hence I continued with OH3 and the extension was finally merged there. As @kaloschke mentioned the latest beta of the 2.5.9 onecall API snapshot version is still available for download at Klimts private Cloud . The binding configuration documented for OH3 should more or less should work with this version.

As I switched to OH3 myself in the meantime, it is more than unlikely that I will ever backport the extension to 2.5.

1 Like

Apologies to for not understanding the documentation methodology. If you google, you are directed to the most recent version. However if you are on an older version, you need select the correct version on the upper left corner of the documentation web page.

If anyone else needs onecall API on a 2.5.x installation and has no clue how to replace the addon with klimts version, here is my way:

Number:Temperature  MaxTempToday  "Max Temperature today [%.1f %unit%]"                  <temperature>    {http="<[http://api.openweathermap.org/data/2.5/onecall?lon=*replace*&lat=*replace*&units=metric&exclude=minutely,hourly,alerts&APPID=*replace*:900000:JSONPATH($.daily.[0].temp.max)]"}

You need to get an API key from Openweathermap.org, which you get for free for this purpose. You also need to install the transformation addon JSONPATH. If you want to extract more values out of one API request, you may want to use the http1 addon. This safes resources and keeps your API limits down.

To use the beta version of the binding in OH2.5, just copy the jar file into the subdirectory “addons” (on linux probably: /usr/share/openhab/addons ) of your OH2.5 installation. It should be loaded then automatically.

I assume you should uninstall/remove the original 2.5 openweathermap binding before in case you already installed it.

I’ve tried that, even cleaned tmp and cache to no avail. Maybe you have to do some more steps in Karaf, not sure.

Then I was struck with [Solved] OH2.5.12 Error downloading mvn:org.openhab.ui.bundles/org.openhab.ui.paper/[2.5.0,2.6)

I dont want to touch the setup any more - its working now.