Publish new addon

Dear maintainers,

Some time ago I created a binding for Qbus (a home automation system from Belgium).
The JAR file has been tested and improved, so it should be ready to go on line.
I’m not a great user of github, but i managed to fork the bindings repositry and added my binding to it.

I don’t know what the next steps are to get it published.

Can you advice me please?

Kind regards

I believe you need to test the binding with Java 11 & openHAB 3 before it can be added now. Others can confirm that. I believe the openHAB 2.x repos have been archived as readonly.

In short. On GitHub on your fork you can make a pull request of your branch. This pull request will then go against the openHAB-addons repo and next your pull request will be reviewed and when all is ok it will be merged and become part of distribution.

What Bruce says. The pull request should be done against the main branch. Which means it should be for openHAB 3 and (which will run on Java 11).
With the start of openHAB 3 development on the openhab-addons repo the basis was ‘reset’. This means an old branch is out-of-sync with the new repo. It is probably the easiest to start with a fresh branch created from the new main. Run the skeleton script to create the basis for your binding (Which modifies all other necessary files) and then copy your binding code in the newly created code and follow Guide: Binding development changes for openHAB 3 (from 2.5.x) to make it compatible with openHAB 3.

To get through the review process quicker. Make sure you have all required files and additional files modified. Make sure you follow general Java coding standards. Make sure the readme is complete. Make sure it compiles (by running maven). Fix relevant compile warnings. Run mvn spotless:apply. Already merged bindings are a good starting point to see what other files need to be modified and make sure your commits are properly signed off.

1 Like

Well, today was a bit frustrating.
Eventually I ended updating maven (is now on version 3.6.0) , Java (is now on 11.0.8) so i guess this is a good base to start from.

Then I deleted everythin from Eclipse that ic could find on my pc (including the .m2 folder) and made a fresch install for openHAB 3.0.

I created a new binding from the skeleton.
I added the new binding to the pom file of the demo app and enabled by dragging my binding from Repos to Requirements.

I had some errors wich i managed to get rid off by executing
mvn spotless:apply -pl :org.openhab.binding.bindingname
mvn clean install -pl :org.openhab.binding.bindingname

One error remains when i click on resolve though:

Resolution failed. Capabilities satisfying the following requirements could not be found: [<>]
⇒ osgi.identity: (&(osgi.identity=org.openhab.core.karaf)(version>=3.0.0))
⇒ [org.openhab.core.karaf version=] ⇒ osgi.wiring.package: (&(osgi.wiring.package=org.apache.karaf.features)(version>=4.2.0)(!(version>=5.0.0))) [org.ops4j.pax.web.pax-web-jsp version=7.2.11] ⇒ osgi.wiring.package: (&(osgi.wiring.package=javax.el)(version>=3.0.0)(!(version>=4.0.0)))
[jakarta.activation-api version=1.2.1] ⇒ osgi.wiring.package: (osgi.wiring.package=com.sun.activation.registries)

I found a thread somewhere in this forum about this error and the advce was to execute ‘mvn -DskipChecks -DskipTests clean install’ which also gave me some spotless errors on a binding, so i ran ‘mvn spotless:apply’ and then the first command again.
Every binding got rebuild perfectly now.

But still I have this annoying error. I can’t get rid of it.
openHAB3 runs fine :slight_smile: Seems very promissing :slight_smile:
But I can’t see my binding.
I also enabled the Astro binding for testing which also doen’t work.

I guess the error got something to do with it?

Any advice?

If you have a resolution error the demo app won’t work. So this needs to be fixed. Did you also installed openhab-core with the eclipse installer?

I did not, is this required?

No its not required. Its actually not recommended and not needed if you develop a binding. I asked to check if that might be a possible addition additional source of the problem (not that it actually might be a problem)

The package it fails on doesn’t ring any bells. There where some changes the last days that caused errors, but afaik these where different problems. Can you rebase your branch to the latest main code both in openhab-addons as well as openhab-distro to just see if this makes a difference.

OK, seems like i’m making progress here. I deleted everything from my pc that has to do witch Eclipse. (m2, p2 eclipse and the installation folder) Then reinstalled. Tried multiple times where the first thing i did was pressing the resolve button and updated all requirements. After that i created and added the binding. This didn’t work.

Now I’ve did a fresh install, created the skeleton, added the skeleton and ran without updating the requirements. Off course this didn’t work.

After the first run I updated the requirements, which i suppose also added my binding to the app.
The same error came on my screen, but when I run now, it looks fine at first sight.

Don’t know how or why, but this time I have my binding in in Things. :slight_smile:

Can’t update anymore after pressing resolve, hope this isn’t necessary anymore.

Allright, OH2 binding allready converted to OH3. Up and running :slight_smile:
Even with that strange error :wink:

@hilbrand HELP, so it didn’t ran as I hoped, I was a little bit to quick :frowning:
Checked out the openhab-cli console. There I saw my older bindings still active and the new one as installed.
So I removed the old ones and tried to start the new one (V3.0.x) an get this error:

Error executing command: Error executing command on bundles:
        Error starting bundle 203: Could not resolve module: org.openhab.binding.qbus [203]
  Unresolved requirement: Import-Package: org.openhab.core.config.core

My older version uses org.eclipse.smarthome.config.core.Configuration
The new one org.openhab.core.config.core.Configuration

That must be the problem. Is the 3.0.0 binding only compatible with version 3.0.0 of openHAB, or should it (i hope) be backwards compatible with 2.5.x?

Yes the 3.0.0 only works on 3.0.0 and is not backward compatible. And 2.5.x. bindings won’t work on 3.0.0. This is due to the namespace change of openhab core.

OK, no problem.
Is it still possible to develop bindings for OH2?
I installed OH2 in Eclipse but the skeleton script is missing.
Don’t know if I should put more time in OH2 development or just wait for the release of OH3 (any release date? )

You can start developing your binding for openHAB 3.0.
There will be no new features added to openHAB 2.x, only bug fixes will be published.

Thx for your answer, but my binding is working in OH3, no problem there.
But I know some people who want to use the binding, they all have OH2.
So the best solution would be that they can use OH3.

No binding updates?

No more new bindings for openHAB 2.x, just fixes. That’s what @Kai announced.

OK, more than understandable.
I know it is ‘dangerous’ to predict when V3 will be released, but can you make a rough estimation please?

Early October we should have a first milestone build of openHAB 3.0 and we are still aiming for the release by the end of the year.


THX :slight_smile: