Announcing OpenWeatherMap binding for Eclipse SmartHome / openHAB

I installed the binding a few days ago for the first time (2.4) using Paper UI.

That version does not contain the 1h forecast change from https://github.com/openhab/openhab2-addons/pull/5070. You would need to upgrade to a snapshot version of OH or a snapshot version of the binding.

I do not recommend upgrading OH to a snapshot version at this time unless you are developer-minded, as there are still some kinks being worked out after the ESH reintegration and build system change. So, better to wait for at least 2.5 M2.

I will just wait a bit. Thanks a lot for the great work!

It’s @cweitkamp that deserves the kudos!

Hi, I have just installed this binding and it works great.

I have set the language to english in the things file, but I have one current condition that comes up german. Is there any fix for this?

Thanks
Jared

Hi Jared,

Unfortunately not. The binding receives the translated conditions from the OWM API and only forwards them. The only hint a can give you is to double check your settings to exclude any unexpected behavior.

Thanks for the response I’ll go through the settings again and see what I can find.

I found it, user error strikes again. Thanks for verification*

Jared

Hi everyone,

sorry for this question, but I am facing an issue I am not able to solve :smiley:

image

These are the values based on my geo location in OpenWeatherMap. Once checking my basic ui, I find the following:

What I am wondering now, why is the wind in the upper picture 190 - South, the provided value is based on the mapping Nord, which is related to a value of 3.3161255…do I have a bug in my mind? My understanding was, I have the mapping table and based on the provided value of 190 the wind direction should be South.

Furthermore yesterday was rain, the OpenWeatherMap page showed rain 1.2mm but my system didn’t. I don’t get it :-D.

Hope someone can help me out.

Thx you.

Nobody an idea? @cweitkamp maybe?

Found the issue…I had a wrong item definition for the wind direction. instead of number:Angle I used number:dimensionless…problem solved, user happy :smiley:

The free OWM binding never reports current rain. If you persist this data, e.g. in influxdb, then you’ll see it is always zero. There’s nothing you can do unless opting for a paid plan. Or resort on using another source of rain information.

1 Like

It does at my setup. But it´s far from accurate.

Hi anyone,

I just installed the openweather binding to switch from Darksky due to the Apple acquisition and I found in the documentation that it is possible with the free api to get a forecast for 120 hours equals 5 days.

In post #190

@kugelsicha tells that it should work but unfortunately it does not work for me

My things definition looks like this:

    Thing weather-and-forecast local "Wetter und Vorhersage in MyCity" [location="XXX,YYY", forecastHours=96, forecastDays=7]

My items definition looks like this:

Number:Temperature  MyCityHourlyForecast48Temperature "Temperature in MyCity in 48 hours [%.1f %unit%]" <temperature> { channel="openweathermap:weather-and-forecast:api:local:forecastHours48#temperature" }
Number:Temperature  MyCityHourlyForecast72Temperature "Temperature in MyCity in 72 hours [%.1f %unit%]" <temperature> { channel="openweathermap:weather-and-forecast:api:local:forecastHours72#temperature" }

But I do not see any values in the 48 and 72 forecastHours …
Am I doing something wrong?
Or did the free API change and does not provide forecast data beyond 24 hours anymore? (In that case the documentation is misleading …)

I would kindly appreciate any hint or idea how to get the data (if available)

Thank you
Justus

You don’t normally specify both. The daily will try and fail, I do not know if that will blow up your 48hr channels etc.

From the binding docs -

Attention : The daily forecast is only available for paid accounts

See what your openhab.log has to tell you

Hi @rossko57

I changed forecastDays=0 (see below)

Thing weather-and-forecast local "Wetter und Vorhersage in MyCity" [location="XXX,YYY", forecastHours=96, forecastDays=0]

And after restarting the bundle I got values for 03, 06, 12, 24 but no entries for 48 and 72 …

23:22:41.685 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast03Temperature changed from 18.6 °C to 18.51 °C
23:22:41.694 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast06Condition changed from Klarer Himmel to Überwiegend bewölkt
23:22:41.697 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast06ConditionIcon changed from raw type (image/png): 2817 bytes to raw type (image/png): 2773 bytes
23:22:41.699 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast06Temperature changed from 16.81 °C to 17.95 °C
23:22:41.735 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast06Humidity changed from 56 % to 54 %
23:22:41.737 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast12Condition changed from Überwiegend bewölkt to Klarer Himmel
23:22:41.739 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast12ConditionIcon changed from raw type (image/png): 2773 bytes to raw type (image/png): 2859 bytes
23:22:41.741 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast12Temperature changed from 17.23 °C to 23.36 °C
23:22:41.741 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast12Pressure changed from 1018.0 hPa to 1019.0 hPa
23:22:41.745 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast12Humidity changed from 60 % to 42 %
23:22:41.767 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast24ConditionIcon changed from raw type (image/png): 2859 bytes to raw type (image/png): 2817 bytes
23:22:41.777 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast24Temperature changed from 23.4 °C to 22.55 °C
23:22:41.777 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast24Pressure changed from 1017.0 hPa to 1019.0 hPa
23:22:41.777 [INFO ] [smarthome.event.ItemStateChangedEvent] - MyCityHourlyForecast24Humidity changed from 42 % to 44 %

I do not see the binding in log:get?
How can I set it to DEBUG to see more?

I found the problem!!!

You have to use the geo coordinates given by Openweather Website (e.g. New York): https://openweathermap.org/find?q=New%20York%20City

The geo coordinates are: [40.7143, -74.006]

I used before the geo coordinates from Google: 40.6976684,-74.260556

When putting the geo coordinates from Openweather into the thing definition it works!!!

NEW => WORKS:

Thing weather-and-forecast New York "Wetter und Vorhersage in New York" [location="40.7143, -74.006", forecastHours=96, forecastDays=0]

BEFORE => WORKS NOT:

Thing weather-and-forecast New York "Wetter und Vorhersage in New York" [location="40.6976684,-74.260556", forecastHours=96, forecastDays=0]

Curious, I’ve just been playing with arbitrary geo coordinates without surprises.
More inclined to think it was the forced Thing update from the act of changing coords, even though you’d previously changed forecastDays=

1 Like

The free API does not provide daily forecasts, so you must set forecastDays to 0. In order to get a 5 day forecast (24 * 5 = 120), you will need to set forecastHours to 120 and aggregate the hourly forecast, which comes in 3h chunks. See…

This is not correct. You can configure your location to be any valid coordinates and get reports. After making a change to the Thing, you will not notice a change until the next poll interval. The openweathermap binding will also pull the coordinates from your OH system settings (Configuration> System> Regional Settings).

1 Like

I did post a test build of the binding which will work for the OneCallAPI and provide daily forecasts - it’s in this thread:

Ok, thank you for the clarification. I assume that it was then the thing update to forecastDays=0 that did the job and maybe it just took a while and it was a coincident that it happened when changing the geo coordinates.

I am happy that it works now! Thank you very much for supporting me!

1 Like