Weather Binding (OpenWeatherMap)

I am trying to get the Weather Binding (OpenWeatherMap) working. I am missing some knowlegde on the subject and hope for assistance.

The binding seems to connect to OpenWeatherMap, log-file shows temperature and humidity updating regularly. I can not get weather to show in Paper UI under “Things” and therefore i am stuck.

My installation:

OpenHab 2 on a RaspberryPi.

What i did:

  1. Installed Weather Binding 1.10.0 through Add-ons in Paper UI.
  2. Created Weather.cfg file
  3. Created weather.item file

Unsure about (a lot):

Should I create at weather thing file? (Basic knowlegde missing here).

Paper UI (Items):

weather.cfg:

#The apikey for the different weather providers, at least one must be specified
#Note: Hamweather requires two apikeys: client_id=apikey, client_secret=apikey2
#apikey.ForecastIo=
apikey.OpenWeatherMap=xxxx
#apikey.WorldWeatherOnline=
#apikey.Wunderground=
#apikey.Hamweather=
#apikey2.Hamweather=
#apikey.Meteoblue=

location configuration, you can specify multiple locations
location.cph.name=Copenhagen, DK
location.cph.latitude=55.675941
location.cph.longitude=12.565530
location.cph.woeid= (required for Yahoo provider)
location.cph.provider=OpenWeatherMap
location.cph.language=en
location.cph.updateInterval=30
location.cph.units=SI

location..name=
location..latitude= (not required for Yahoo provider)
location..longitude= (not required for Yahoo provider)
location..woeid= (required for Yahoo provider)
location..provider=
location..language=
location..updateInterval=
location..units=

weather.item:

//SYNTAX: itemtype itemname “labeltext” (group1, group2, …) [“tag1”, “tag2”, …] {bindingconfig}

Number OpenWeather_Temperature “Temperatur [%.2f °C]” {weather=“locationId=cph, type=temperature, property=current”}
Number OpenWeather_Humidity “Fugtighed [%d %%]” {weather=“locationId=cph, type=atmosphere, property=humidity”}
Number OpenWeather_Temp_Min “Temperatur min [%.2f °C]” {weather=“locationId=cph, forecast=0, type=temperature, property=min”}
Number OpenWeather_Temp_Max “Temperatur max [%.2f °C]” {weather=“locationId=cph, forecast=0, type=temperature, property=max”}
DateTime OpenWeather_LastUpdate “Sidste opdateret [%1$td.%1$tm.%1$tY %1$tH:%1$tM]” {weather=“locationId=cph, type=condition, property=lastUpdate”}

OH1 bindings don’t do “Things”, so no.

You’ll need to create a sitemap to include your weather items.

@kimigenigen You should remove your API key from this forum to prevent abuse

…so a sitemap is also needed for OH2 Paper UI to show OH1 bindings? just to be sure about my understanding.

Thank you!..it has been corrected.

And I hope those coordinates do NOT identify your home location (you can safely strip anything but the first 2 decimals, I guess)

I have copied the coordinates from OpenWeatherMap.

You are right, less could do it. I have checked Google Maps, two decimals will do fine. Approx less than 600 m distance on Google Maps when choosing two vs three decimals.

Thank you Robert!
I have now created and testet the setup with a sitemap file. It works! the weather data are now showing in Basic UI.

OH2 Paper UI doesn’t show OH1 bindings. Somehow I have missed this information, maybe the documentation could be more clear on this subject, or maybe not…anyway I am happy now.

Thank you for your input!

Case closed.

sorry for ressurecting old topic, but I don’t want to open new one as this is about Weather Binding as well, but about html part.

Was anyone able to get it work in OH2 ? (wiki page says it does not work on OH2 and needs to be updated)
When accessing URL > http://openhab.local/weather?locationId=home&layout=example&iconset=colorful

It returns server error basically only because it’s looking into ./webapps/weather-data/layouts instead of ./conf/html/weather-data/layouts

I was not able to find where this is defined (yet) and if i can somehow change it.
Does anybody knows?

Thanks