Dark Sky - Yawb4oH2 (Yet another weather binding for openHAB 2)

How can I get this addon downloaded and installed on a docker image?

Use the “latest” tag for the docker image, then you should get the addon included. That’s what I do anyways :slight_smile:

I tried that and I still do not get it at all.

Hi @Robert_Burgess,

You can download the latest version here. But be aware of the fact that it will not work with an older OH2 version because of not available dependencies. Minimum is OH 2.5.0 snapshot 1566.

Hi, I tried your binding in last snapshot, works great. One value I would like to see is WindGust. Possible to add? Have this in my vera: CurrentWindGust. Thanks.

HI,
i use OH2.5 M1

Binding do not work

Here is te Log:

2019-06-16 09:49:08.698 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.darksky-2.5.0-SNAPSHOT.jar

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.darksky [279]

Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"

at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]

at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [10:org.apache.felix.fileinstall:3.6.4]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]

at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]

Did you read one post above? it says: Minimum is OH 2.5.0 snapshot 1566

oh yes, who can read is in the advantage!
Thanks

but I totally agree it’s not always possible to read all the posts :wink:

Hi @chris669,

The channel gust-speed of channel type Number:Speed is already supported by the binding (see https://www.openhab.org/addons/bindings/openweathermap/#current-weather).

I got this working yesterday on 2.5M1 thanks to a tip from @5iver here.When in the addons directory, I first installed this:

curl https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar > gson-2.8.5.jar

I then installed

curl https://ci.openhab.org/job/openHAB2-Bundles/org.openhab.addons.bundles%24org.openhab.binding.darksky/lastSuccessfulBuild/artifact/org.openhab.addons.bundles/org.openhab.binding.darksky/2.5.0-SNAPSHOT/org.openhab.binding.darksky-2.5.0-SNAPSHOT.jar > org.openhab.binding.darksky-2.5.0-SNAPSHOT.jar'
2 Likes

@cweitkamp

I have just started working with the darksky binding.
Would it be possible to add channels with the icon descriptions so we could use a different icon set? I believe the API, by default just provides an icon description.

Thanks for your work.

Thanks for using the binding. Did you see the icon-id channel? It should return the description you are looking for. Be aware it is an advanced channel, thus not visible in an UI by default.

How do I access it then. Text item?

Depends on your setup. Most of the UIs have a “Show more” button to toggle visibility of advanced channels. In textual configuration use a String item like this:

String localCurrentConditionIconId "Icon ID" { channel="darksky:weather-and-forecast:api:local:current#icon-id" }
1 Like

Thanks.
I am still learning the UI too. Selecting “show More” does show the icon-id.

current#precip-intensity could be a useful addition from the API, IMHO.
current#apparent-temperature too.
Bith those are in the Home Assistant implementation for darksky.

The precipitation intensity is mapped to the channels rain and snow depending on the precipitation type. I omitted the apparent temperature for a reason. It is a “calculated” value and the used formula differs in various places. Some use e.g. “Heat index” and others “Humidex”. You can easily calculate it on your own in a rule.

Thanks. There are 3 precipitation types, though. rain, snow, sleet How is that mapped?
For my use the overall intensity may be useful but I guess I can just sum the values.

One minor units issue for Imperial units. The visibility defaults to inches but is better expressed in miles. I used the label attribute to adjust.

I am trying to make a Flask web app using the REST API to display weather with animated icons in a Webview similar to this:

image

It is initially for my own use but perhaps, with help it could be packaged to share. I have my items defined and am just starting on the Python Flask part.

1 Like

“sleet” seems to be a new type - or I was not aware of it. In case of type “rain” the data will be mapped to the rain channel, in case of “snow” to the snow channel. In this situation it maybe makes sense to introduce two new channels for precip-type and precip-intensity.

That is exactly how it should be done. :+1:

One more question to you - you seem to be very familiar with the API. Did you see my request for help in my OP? I am really interested in implementing the alert feature but I do not have experience with it. Do you? On the other hand I just saw DarkSky improved their docs and it now contains an example alert …

1 Like