Determine addons supported in openhab2 and how to handle V1 addons

I am not sure what is the best way and also mechanism to use bindings.

  1. how can I determine which addons are supported?
    It seems that https://github.com/openhab/openhab-distro/blob/master/docs/sources/addons.md is a bit dated.

  2. are compatible openhab 1.x addons, “installed” also via the addon.cfg or does this only apply for openhab 2 addons?

  3. some addons required binding and actions jars With the new addon.cfg, do I have to reference addons both in binding and actions (example would be the homematic binding)?

  4. The caldav binding even had 3 jars, action, binding and io. How to handle this with the new addon.cfg?

  5. if I want to test, not listed jars, e.g. the prowl.jar, is it a good idea to manually put those jars into the addon folder or does this make no sense?

regards

Martin

Please provide results of your tests and we will update this page.

ok I will. Could you please answer question 5.

First you have to start Paper UI and check if your binding is listed. If it is, that means that the binding was already tested with success in OH2 and is already packaged with OH2 distro. So just install it from Paper UI (and don’t put any jar for this binding in your addons folder).
If your binding is not listed, that means the binding is not yet confirmed to be working in OH2 and is not yet packaged with OH2 distro. you will have to do it through the addons folder like before, that is put your jar in the addons folder. Don’t set your binding in the addons.cfg file in this case.

If you use Paper UI to install a binding, all dependencies are automatically installed, you don’t have to care about that.
If you install manually through the addons folder, you will have to take care about the dependencies and probably have to start manually features in OH2. In all cases, for a 1.x binding, you will have to install openhab-runtime-compat1x feature if not installed. For a binding using the serial communication for example, you will have to check that openhab-transport-serial feature is installed.

1 Like

@Lolodomo
Thanks that helped a lot.
How is openhab-runtime-compat1x feature installed.
Via the forementioned Paper UI mechanism?

It is already documented.

You have to use the console command: feature:install openhab-runtime-compat1x

To check if already installed (and started): feature:list | grep compat

The answer is “yes” to your third question.
And for your 4th question, the answer is yes for the binding and the action and probably no for the io jar (install will be done automatically).

Interestingly, it seems to be already installed.
For sure not by me.

Thanks for support.

PS: I was refering to the compat 1.x feature.

It is automatically installed as soon as you installed a 1.x binding through the addons.cfg file or through Paper UI. As previously explained, all dependencies are automatically managed when you consider a binding already packaged in the OH2 distro.

OK. Just a quick one for clarification
The addons.cfg must only be used, if I am not able to install the binding via the paper UI?

No, addons.cfg is just a way to declare what you want to install through a text file rather than using Paper UI.
It can be very practical to keep this file for example when you upgrade to a new OH2 version. No need to look for all your bindings in Paper UI t install them again, they will be installed automatically at startup (because set in the addons.cfg file).

ok. thanks.
I see the problem with this approach, that I cannot distinguish between and openhab 1 and 2 binding.
In the paper ui, there is for example the astro binding in the 1.0 version and the 2.0 version.

And for any binding not packaged in the distro, just use the 1.x method (jar in the addons folder).

If you want to use a different version of a binding compared to the one packaged in the distro, don’t install it from addons.cfg or Paper UI, but put your particular new jar file in the addons folder.

Except for the astro binding, they decided to only package the 2.0 binding when it exists and to forgive the 1.x version of this binding.
In my opinion, as the 2.0 bindings are not all working very well and few of them are missing features included in the 1.x version, I think it is a bad idea. But of course, you can in this case forget the binding packaged in the distro and install the 1.9 version of the binding manually (putting the jar file in the addons folder). It is what I am doing for example for the RFXCOM and the Freebox bindings until the 2.0 versions of these bindings are fixed/enhanced.