Distributing bindings through the IoT Marketplace

All,

As the queue for binding PRs is still too long at thus it has become a common practice to share JARs of unmerged bindings with other users on Github, there was the strong wish to have some easy mechanism to share such bindings.
Well, I am happy to announce that we now have an (early) version of such a mechanism in place: The Eclipse IoT Marketplace integration! Here are the details:

Eclipse IoT Marketplace

The Eclipse IoT Marketplace is a website, which allows people to exchange extensions for Eclipse projects and it now comes with a section for Eclipse SmartHome (which is still pretty empty, but that is why I tell you about it :slight_smile: ). Note that the name “marketplace” does not mean that anything is sold there - it is fully uncommercial, nothing needs to be paid and it is all about sharing.
If you have an Eclipse account, you can add your own content (binding) there:
You should select IoT Category “Eclipse SmartHome”, Package Type “Binding” and “Package Format” “bundle”:

In the “Package Download URL”, you can then link to a jar file somewhere on the web (see below how to make the result of a PR easily available).

Please follow these general guidelines for your submission:

  • Let’s add “Binding” to the label (as we will have other add-on type in future there as well)
  • As it is the Eclipse SmartHome marketplace, do not specifically say “for openHAB 2” - it should in general be compatible with any ESH-based solution.
  • Let’s try to have logos for the listings, so that the appearance is nicer when browsing them

Submissions are usually approved by the marketplace admins within 24 hours.

openHAB Marketplace Integration

Since build #828, the openHAB 2.1.0-SNAPSHOT distro has a new “misc” add-on for the IoT Marketplace:

If this is installed, you will find (after a page refresh) all bindings from the marketplace on the “bindings” tab as well. To make it easier to browse through the entries, there is now a new (optional) card layout besides the list layout (see the icons on the top right) and a logo and a description text. To filter for only marketplace entries, simply type “market” in the filter bar:

On “INSTALL”, the bundle will be immediately installed (but obviously only if you are online as they are downloaded from the remote url).

Note 1: Dependencies are NOT automatically installed - it is merely the single bundle that is installed. So you should make sure that you have all dependencies (like e.g. serial-transport or jupnp) already manually or as a dependency of another binding.

Note 2: The jars are installed in the OSGi cache - which means that they are lost upon an openHAB distro upgrade (which cleans the cache) - you will have to manually re-install then from the marketplace. As the main use case for the start will be for testing pre-releases, I think this is acceptable. For the future, I also plan an improved mechanism, which would download the jars to the addons folder (or something similar), so that they are kept over an upgrade as well.

Binary Builds from Pull Requests

Instead of manually building the jar from sources and uploading it to Github/Dropbox/GDrive or some other website for sharing, there is now a much simpler way: I have setup the PR builder on our Jenkins, which first of all validates that a PR is buildable, but secondly also deploys the result in a new Maven repo on our Artifactory instance: https://openhab.jfrog.io/openhab/libs-pullrequest-local/
So as an example, the Plugwise binding from this PR is automatically available as a jar at https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.plugwise/2.1.0-SNAPSHOT/org.openhab.binding.plugwise-2.1.0-SNAPSHOT.jar. This url can be directly used as the download url for the IoT marketplace.

Note: The shared Maven repo for PRs obviously has the risk that if somebody else includes changes to a certain binding in his PR that the binary jar is changed accordingly - so it can be tricky to tell, what its origin is. I therefore only recommend using these urls for new bindings that are not yet part of the repo - refactorings of existing bindings are probably better offered elsewhere.

Start populating the IoT Marketplace!

I hope you like this new feature as much as I do (and I hope you understand why the rate of PR reviews slowed down over the past weeks as I was working on this). Please help and start populating the marketplace with content! It should make the waiting for the code review and merge much less painful. Obviously, the marketplace will also allow us in future to share content that is not and will never be part of the official distro, e.g. because it is closed source, not license compatible or for whatever other reason - I think it is a great mechanism to broaden the openHAB ecosystem.

Best regards,
Kai

36 Likes

This is an amazing development! Thanks to everyone who made this possible :beers:

2 Likes

Many thanks for all your work Kai! :wink:

Jenkins seems to have some issues to publish the online report - so if you are not seeing the IoT Market add-on, download the add-ons zip for offline use - that should work.

1 Like

So there I go, my my first binding on the marketplace :smile:

https://marketplace.eclipse.org/content/sensebox

Next thing to do is to set up a fresh OH2 instance on a spare virtual machine and see how the downloading works…

1 Like

Actually, @kai, what is the preferred distribution process? Should addons which are already part of openHAB 2 also be listed on the marketplace?

If so, could we come up with some way of marking the addons as “is-in-core”?

If not, should listings be disabled and / or removed on the marketplace as soon as a binding is accepted into the core?

Aaaaand, should we use “openHAB Foundation” as organization for bindings which are already in the core?

1 Like

The IoT Marketplace is certainly a nice addition! :slight_smile:

I would like to help populate the marketplace. But it seems there currently is an issue with the OH2 PR build. As a result the items in Artifactory do not update. Most PR builds show the following build error:

23:58:07.502  |  [ERROR] Cannot resolve project dependencies:
23:58:07.502  |  [ERROR]   Software being installed: org.openhab.binding.feed 2.1.0.qualifier
23:58:07.502  |  [ERROR]   Missing requirement: org.openhab.binding.feed 2.1.0.qualifier requires 'package com.rometools.rome.feed 0.0.0' but it could not be found
23:58:07.502  |  [ERROR] 
23:58:07.502  |  [ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
23:58:07.504  |  [ERROR] Cannot resolve dependencies of MavenProject: org.openhab.binding:org.openhab.binding.feed:2.1.0-SNAPSHOT @ /scratch/jenkins/workspace/PR-openHAB2-Addons/addons/binding/org.openhab.binding.feed/pom.xml: See log for details -> [Help 1]

This is a huge step forward!
My thanks & kudos to @Kai and for everyone else that made it possible.

Hello!
I have build # 826.
Apt uptate:
All packages have the latest versions.
Where is # 827, # 828?
Earlier new assemblies looked here:
https://oss.jfrog.org/webapp/#/builds/openHAB-Distribution
Where can you see it now?

apt sources list:
deb JFrog unstable main
PS Why not show the assembly number in the paperUI?
Thank you.

1 Like

@Olymp You can also download the builds directly from Jenkins in case they fail to deploy to Artifactory. E.g. the IoT Marketplace also worked for me after downloading Build #835.

Not sure, what is the problem there as other PR builds have succeeded…

Imho, it would make sense to remove them again afterwards - or keep them as “alpha” as newer, under-development versions on the marketplace.

No, as these entries are created from private accounts, I’d suggest you leave the organization field blank.

Some additional suggestion after seeing the first two listings from @hakan and @TimO, to make the appearance of the listings a little bit aligned (https://marketplace.eclipse.org/content/mysensors-binding and https://marketplace.eclipse.org/content/sensebox):

  • Let’s add “Binding” to the label (as we will have other add-on type in future there as well)
  • As it is the Eclipse SmartHome marketplace, do not specifically say “for openHAB 2” - it should in general be compatible with any ESH-based solution.
  • Let’s try to have logos for the listings, so that the appearance is nicer when browsing them

Thank you for the suggestions @Kai! I’ve fixed these things.

I really like the idea of the marketplace! Is there a way that dependencies could be installed automatically in the future? In case of the MySensors binding “openhab-transport-serial” is needed.

Removing and re-creating whenever a fresh development branch starts would be a hassle I guess. A “disable” button on the marketplace would be nice, so I can hide my entry and restart it quickly whenever I start making changes again.

Where would I create enhancement requests for the marketplace? Eclipse bugzilla perhaps?

Are there licence implications with this?

No, the binding is in any case available under the EPL (assuming you provide a binding from a PR).

Yes, at Log in to Bugzilla and then select “Marketplace” as a Component.

Great!
I ve also Binding which could go there.

I love it, opening the Forum and seeing such cool things.

Big kudos to all involved and thanks @Kai !!

BR Mehmet

1 Like

Yes, the plan is to also support Karaf features/archive packaging in future - this would allow to automatically consider all dependencies. The current jar-only approach was what I was able to implement rather quickly for a start and I wanted to have that in place as quickly as possible. From this, we can also learn what else we might expect from the marketplace.