Announcing OpenWeatherMap binding for Eclipse SmartHome / openHAB

Yes, does that to me too and it comes back online

Before I tried this binding, I used the OH1 weather binding for OWM.

With that binding, there I are some more values available. At least I had those before:

{weather="locationId=home, type=temperature, property=feel"}
{weather="locationId=home, type=atmosphere, property=pressureTrend"}

Is it planned to add them also to this new binding?

Does anyone know if the Channel openweathermap:weather-and-forecast:api:local:current#time-stamp pulls info into the DateTime Item in UTC or local TZ?

edit: found it… added %1$tz and saw that it is using local (the default set in my i18n)… good :slight_smile:

Hi Ulrich,

Boot is not. Because those information are not delivered by the OWM API but calculated by the weather binding itself. I do not want to implement calculations inside the OWM binding. If you really need them I suggest to setup a rule for it.

IIRC an experimental binding for weather calculations is available via the Eclipse Marketplace.

Yes the binding transforms every DateTime information to your local timezones.

1 Like

Thanks for your feedback.
I understand your point and will look if I find a solution for the felt temperature.

Here is a link:

1 Like

I can confirm that this binding works very well

I tried it also and it works for me as well.

Hi to all.
Get someone updated rain und snow values. It’s raining and the current rainvolume is still 0,0 mm. No update all the time.
Thanks and greetings,
Markus

1 Like

Hello,
same problem as Markus,
It is raining since 2 hours, OWM shows a current value >0.00 mm but I see always 0,00 mm on the HABPanel.

Guys,

Can you do me a favor and enable debug logging for org.eclipse.smarthome.binding.openweathermap and send me the response for the current weather request? Thanks in advance.

Hi Christoph.
Here it is:

2018-12-08 18:24:28.262 [DEBUG] [overy.OpenWeatherMapDiscoveryService] - Location is not set -> Will not provide any discovery results.

2018-12-08 18:25:28.264 [DEBUG] [overy.OpenWeatherMapDiscoveryService] - Location is not set -> Will not provide any discovery results.

2018-12-08 18:26:28.265 [DEBUG] [overy.OpenWeatherMapDiscoveryService] - Location is not set -> Will not provide any discovery results.

2018-12-08 18:27:28.267 [DEBUG] [overy.OpenWeatherMapDiscoveryService] - Location is not set -> Will not provide any discovery results.

2018-12-08 18:27:51.988 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update weather and forecast data of thing 'openweathermap:weather-and-forecast:api:local'.

2018-12-08 18:27:52.151 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'id' of group 'station' with new state '6545310'.

2018-12-08 18:27:52.153 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'name' of group 'station' with new state 'Berlin Mitte'.

2018-12-08 18:27:52.154 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'location' of group 'station' with new state '52.52,13.41'.

2018-12-08 18:27:52.156 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'time-stamp' of group 'current' with new state '2018-12-08T17:50:00.000+0100'.

2018-12-08 18:27:52.158 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'condition' of group 'current' with new state 'Leichter Regen'.

2018-12-08 18:27:52.160 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'temperature' of group 'current' with new state '8.0 °C'.

2018-12-08 18:27:52.163 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'pressure' of group 'current' with new state '998.0 hPa'.

2018-12-08 18:27:52.166 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'humidity' of group 'current' with new state '75 %'.

2018-12-08 18:27:52.169 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'wind-speed' of group 'current' with new state '7.7 m/s'.

2018-12-08 18:27:52.172 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'wind-direction' of group 'current' with new state '230.0 °'.

2018-12-08 18:27:52.175 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'cloudiness' of group 'current' with new state '75 %'.

2018-12-08 18:27:52.178 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'rain' of group 'current' with new state '0.0 mm'.

2018-12-08 18:27:52.180 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'snow' of group 'current' with new state '0.0 mm'.

2018-12-08 18:28:28.269 [DEBUG] [overy.OpenWeatherMapDiscoveryService] - Location is not set -> Will not provide any discovery results.

2018-12-08 18:29:28.270 [DEBUG] [overy.OpenWeatherMapDiscoveryService] - Location is not set -> Will not provide any discovery results.

But my location is wrong. It’s not Berlin. I have changed it in the demo.thing. But its wrong again.

Bridge openweathermap:weather-api:api "OpenWeatherMap Account" [apikey="xxx", refreshInterval=10, language="de"] {
    Thing weather-and-forecast local "Local Weather And Forecast" [location="51.xx,6.xx", forecastHours=3, forecastDays=0]
    //Thing weather-and-forecast miami "Weather And Forecast In Miami" [location="25.782403,-80.264563", forecastHours=24, forecastDays=0]
}

Greetings and thanks for help,
Markus

Now i have set the regional settings in Paper UI and took this for location in demo.thing.

Bridge openweathermap:weather-api:api "OpenWeatherMap Account" [apikey="xxx", refreshInterval=10, language="de"] {
    Thing weather-and-forecast local "Local Weather And Forecast" [location="51.xxxxxxxxxxxxxx,6.xxxxxxxxxxxxxxx", forecastHours=3, forecastDays=0]
    //Thing weather-and-forecast miami "Weather And Forecast In Miami" [location="25.782403,-80.264563", forecastHours=24, forecastDays=0]
}

And now i get:

2018-12-08 19:12:38.994 [DEBUG] [nal.handler.OpenWeatherMapAPIHandler] - Dispose OpenWeatherMap API handler.

2018-12-08 19:12:38.995 [DEBUG] [nal.handler.OpenWeatherMapAPIHandler] - Stop refresh job.

2018-12-08 19:12:38.995 [DEBUG] [nal.handler.OpenWeatherMapAPIHandler] - Initialize OpenWeatherMap API handler.

2018-12-08 19:12:38.996 [DEBUG] [nal.handler.OpenWeatherMapAPIHandler] - Start refresh job at interval 10 min.

2018-12-08 19:12:38.997 [DEBUG] [andler.AbstractOpenWeatherMapHandler] - Initialize OpenWeatherMap handler openweathermap:weather-and-forecast:api:local.

2018-12-08 19:12:38.997 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Initialize OpenWeatherMapWeatherAndForecastHandler handler openweathermap:weather-and-forecast:api:local.

2018-12-08 19:12:38.998 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Rebuilding thing 'openweathermap:weather-and-forecast:api:local'.

2018-12-08 19:12:53.997 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update weather and forecast data of thing 'openweathermap:weather-and-forecast:api:local'.

2018-12-08 19:13:04.231 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'id' of group 'station' with new state 'xxx'.

2018-12-08 19:13:04.232 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'name' of group 'station' with new state 'xxx'.

2018-12-08 19:13:04.235 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'location' of group 'station' with new state '51.xx,6.xx'.

2018-12-08 19:13:04.236 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'time-stamp' of group 'current' with new state '2018-12-08T18:55:00.000+0100'.

2018-12-08 19:13:04.236 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'condition' of group 'current' with new state 'Nieselregen'.

2018-12-08 19:13:04.237 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'temperature' of group 'current' with new state '8.89 °C'.

2018-12-08 19:13:04.238 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'pressure' of group 'current' with new state '1001.0 hPa'.

2018-12-08 19:13:04.239 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'humidity' of group 'current' with new state '87 %'.

2018-12-08 19:13:04.239 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'wind-speed' of group 'current' with new state '10.8 m/s'.

2018-12-08 19:13:04.240 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'wind-direction' of group 'current' with new state '220.0 °'.

2018-12-08 19:13:04.241 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'cloudiness' of group 'current' with new state '90 %'.

2018-12-08 19:13:04.241 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'rain' of group 'current' with new state '0.0 mm'.

2018-12-08 19:13:04.241 [DEBUG] [nWeatherMapWeatherAndForecastHandler] - Update channel 'snow' of group 'current' with new state '0.0 mm'.

But no rain volume.

Thanks for creating the logs. But I gave you a misinformation. We need a TRACE log to see request and response. Sry, my fault.

https://openweathermap.desk.com/customer/portal/questions/16790933-rain-parameter-not-showing-up-

Rain item is showing “1h” in the case when data are received from weather stations directly.
The fact is that some METAR stations do not have precipitation indicators or do not measure precipitation conditions due to some other technical reasons.
In this case, we use model data. So, rain item is showing “3h” when our system returns an API response based on model data.

See Weather parameters in API response.

@cweitkamp: How can I build a TRACE log?

@woanne67 have a look here.

Thanks for this binding, it seems to work very well (was one of the reasons I immediately upgraded to 2.4.0).

One suggestion: When auto-creating items in PaperUI, use shorter default item names. They get so long (especially in German), that mysql cannot always create the persistence table.

I now recreated everything, using item names like LocalWeatherAndForecast_03_Luftfeuchtigkeit instead of LocalWeatherAndForecast_ForecastHours03_VorhergesagteLuftfeuchtigkeit.

You’re welcome. It was fun. Why “seems”? It “does”! Doesn’t it?

Why are those long item names a problem for mysql persistence? I’m afraid I couldn’t follow. In my database all tables follow the following naming convention: itemXXX (XXX = 000 - 999). The item’s name is stored in a separate table holding a reference to the itemXXX table. I’m using mariadb with JDBC persistence.

It “seems” because I have only tested it for 1 day. :wink:

The long table names are a problem because I configured

tableUseRealItemNames=true
tableIdDigitCount=0

in “jdbc.cfg”. I like to find my data more quickly. :slight_smile: