Announcing OpenWeatherMap binding for Eclipse SmartHome / openHAB

Thanks @cweitkamp for the updates :slight_smile:

I saw in the code changes that you also added gust speed to the hourly forecast… but i dont see it in the json if i call the api directly… did i missed it? or is it not in there?

In the normal weather json it is there…

Counter questions: Do you find it somewhere in the API docs? It is neither listed in the current weather nor in the forecast sections. But it is available in the response …

nope… i was just wondering after i have seen it in the api call… so “weather” has it “forecast” not…

the only thing i found it documented was in the stations api Weather Stations - OpenWeatherMap

maybe the API doc is not up to date for the weather call… so if we can grab it… fine… we take it… I just wanted to point, that the hourly forecast dont have it… and since the daily forecast is in the paid plan (which i dont have) i’m not sure about if its there…

Was there a reason why the Current temperature and current humidity channels were removed?

Nevermind I see it’s because I Don’t have the latest snapshot of OH2. Installed. Would it be possible to post the jar of the file before the breaking change was made?

Have a look here: https://openweathermap.org/weather-data. According to this page it should be available for all three services. But it disappears once and a while in my local current weather too. And it is not available in my daily forecast data. Who knows …

@Nanna_Agesen I owe you an example. Here is what I use in my setup:

beaufort.scale

[..1.85[=0 Bft
[1.85..7.41[=1 Bft
[7.41..12.96[=2 Bft
[12.96..20.37[=3 Bft
[20.37..29.63[=4 Bft
[29.63..40.74[=5 Bft
[40.74..51.86[=6 Bft
[51.86..62.97[=7 Bft
[62.97..75.93[=8 Bft
[75.93..88.90[=9 BFt
[88.90..103.71[=10 Bft
[103.71..118.53[=11 Bft
[118.53..]=12 Bft

demo.sitemap

sitemap demo label="My home automation" {
    Frame label="Speed" {
        Text item=testNumberSpeed label="Windgeschwindigkeit [SCALE(beaufort.scale):%s]" icon="wind"
    }
}

The only thing which is missing to make it perfect is a nice valuecolor depending on the Beaufort value. Does anybody like to volunteer for adding it (Beaufort scale)? That would be very much appreciated.

Hi @tebore,

Yes, I will take care of that tomorrow.

Thanks!

Have a look here. I have uploaded an old version.

I just gave it a shot and everything is back up and running.

Thanks for posting it. I had to clear my cache a yesterday and the marketplace binding was “too new”

Cool, I am glad it is working again for you.

@cweitkamp did you already noticed that the wind gust is gone form the “weather” API call?

I installed your new test binding yesterday… and today i was wondering why the gust is still not updated… so i took a quit look on a raw api call… and… gust is gone from it…

Dont know why…

{"coord":{"lon":13.82,"lat":51.15},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"base":"stations","main":{"temp":288.15,"pressure":1020,"humidity":54,"temp_min":288.15,"temp_max":288.15},"visibility":10000,"wind":{"speed":1.5,"deg":160},"clouds":{"all":0},"dt":1535491200,"sys":{"type":1,"id":4879,"message":0.0059,"country":"DE","sunrise":1535429566,"sunset":1535479054},"id":2880067,"name":"Lausa","cod":200}

Hi,

Today i tried to install this binding.
I configured the Binding via PaperUI.

But in the openhab.log i see the following:

2018-09-24 14:58:16.256 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: system:location
2018-09-24 14:58:16.263 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: system:outdoor-temperature
2018-09-24 14:58:16.270 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: system:outdoor-temperature
2018-09-24 14:58:16.278 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: system:outdoor-temperature
2018-09-24 14:58:16.284 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: system:outdoor-temperature
2018-09-24 14:58:16.290 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: system:outdoor-temperature
2018-09-24 14:58:16.296 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: system:outdoor-temperature
2018-09-24 14:58:16.302 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: system:outdoor-temperature
2018-09-24 14:58:16.310 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: system:outdoor-temperature
2018-09-24 14:58:17.737 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel ‘location’ for thing type ‘openweathermap:hourly-forecast:api:local’, because channel type ‘system:location’ could not be found.
2018-09-24 14:58:17.757 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel ‘temperature’ for thing type ‘openweathermap:hourly-forecast:api:local’, because channel type ‘system:outdoor-temperature’ could not be found.
2018-09-24 14:58:17.765 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel ‘pressure’ for thing type ‘openweathermap:hourly-forecast:api:local’, because channel type ‘system:barometric-pressure’ could not be found.
2018-09-24 14:58:17.773 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel ‘humidity’ for thing type ‘openweathermap:hourly-forecast:api:local’, because channel type ‘system:atmospheric-humidity’ could not be found.
2018-09-24 14:58:17.779 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel ‘wind-speed’ for thing type ‘openweathermap:hourly-forecast:api:local’, because channel type ‘system:wind-speed’ could not be found.

Does anybody hast the same problem?
Or does somebody know how to fix it?

Hi Eric,

I have the slight feeling that your system does not fulfill the requirements for the latest version. Have a look here for two versions based on different requirements.

You are right…
I’m running on 2.3 and i used the newest version.

Thanks you for the fast help.
And i really like the Binding.
It’s an good alternative to the weatherunderground-binding.

I must be missing something… I am running OH2.3 … How do I install this OWM binding ?

1 Like

I got the JAR from here

Then i copied it to following directory on my PI:

/usr/share/openhab2/addons/

For me it worked without restart/reboot.

So, I’m on a Synology OpenHab2.3.0 and I used PaperUI to install the OpenWeatherMap market:binding-4126092 - 1.0. Now I get the same ‘Cannot find channel type: system:outdoor-temperature’ errors as Vradatta reports.
It used to work fine, but I’ve updated the Synology version (not the OpenHab version I believe) and had to reinstall everything (no backups, lesson learned there) which broke OWM.
Now I’ve tried to make something of your comment:

Have a look here for two versions based on different requirements.

But I believe you’re trying to direct us to the different Jar files found here

In any case, I’ve added the 2.3 jar to the addons directory, but now the log reports the following:

2018-09-30 10:09:50.317 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/volume1/SmartHome/openHAB/addons/org.eclipse.smarthome.binding.openweathermap-0.10.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.smarthome.binding.openweathermap [231]
  Another singleton bundle selected: osgi.identity; type="osgi.bundle"; version:Version="0.10.0.201808271132"; osgi.identity="org.eclipse.smarthome.binding.openweathermap"; singleton:="true"

Any suggestions on how to proceed?

Yes, it looks like the link changed due to a rebate of my code. Thanks for the update.

The log message tells you that a second version of the OWM binding is installed. Did you remove the market place version before you put the jar file into your addons folder manually?

Apparently when I threw the jar in the addons directory, OH got very confused. I had to jump through a lot of hoops to get the bindings and their Things removed. (I had to completely remove the jar, restart OH and then remove the Things. The things would still show up as ‘uninitialized’ but in the end I ignored that).
After removing I put the jar back and I setup the Things. When they were configured it all worked again. I had some trouble with scripts, but I managed to fix that as well.
Well, thank you for supplying us with the jar.