Distributing bindings through the IoT Marketplace


(Kai Kreuzer) #1

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


New Weather Underground binding for Eclipse SmartHome / openHAB2
OH2 Z-Wave refactoring and testing... and SECURITY
openHAB zmote binding
Chamberlain MyQ Binding
New openHAB2 Binding for Nuki Smart Locks
Spotify binding vs just using http?
How to integrate flic buttons?
Wake on LAN binding for OH2 (Removed by author)
Any interest for an Edisio bridge?
Mi(Xiaomi) Smart home bindings?
New feature: globally provisioned widgets (i.e. with OSGi bundles)
Plugwise binding
Mi(Xiaomi) Smart home bindings?
Binding uninstalls when new nightly is installed
Mi(Xiaomi) Smart home bindings?
How to build a jar for testing for the community
Latest compiled version of the zmote binding?
Connecting Vorwerk Kobold VR200 to openHAB2
Xiaomi Robot Vacuum Binding
Development of TFA Dostmann/CUL binding (distro build problem)
Some new bindings to offer : Azure IOT Hub, Seneye monitor, Smappee monitor
Preparing the openHAB 2.2 release
Modbus openHAB2 binding available for alpha testing
Bose SoundTouch Binding
New DSMR-binding for OpenHAB 2
openHAB2 KnX Binding
OpenHAB CULfw for Somfy RTS Rollershutters
( ) #2

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


(Aitor Iturrioz) #3

Many thanks for all your work Kai! :wink:


(Kai Kreuzer) #4

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.


(Hakan Tandogan) #5

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

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


(Hakan Tandogan) #6

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?


(Wouter Born) #7

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]

(marcel) #8

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


(Sergey M) #9

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 http://openhab.jfrog.io/openhab/openhab-linuxpkg unstable main
PS Why not show the assembly number in the paperUI?
Thank you.


(Wouter Born) #10

@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.


(Kai Kreuzer) #11

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


(Kai Kreuzer) #12

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.


New OH2 binding: Tankerkoenig
(Kai Kreuzer) #13

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

(TimO) #14

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.


(Hakan Tandogan) #15

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?


(Daniel Walters) #16

Are there licence implications with this?


(Kai Kreuzer) #17

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


(Kai Kreuzer) #18

Yes, at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Community and then select "Marketplace" as a Component.


(Mehmet Arziman) #19

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


(Kai Kreuzer) #20

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.