Where are the .JAR files?

Hi,

I am trying to make the journey from OH 1.x to OH 2.x and it’s taking me blood, toil, tears and sweat.

I thought OH2 was meant to be easier to install and IMO it’s harder, although I like the new concepts and possibilities it brings. That’s why I want to migrate to OH2.

However, I would like to make things the old way not using PaperUI at all. It is quite confusing because some things are done through PaperUI (and stored god knows where) and some others are done manually. I don’t like to install a binding in PaperUI and not knowing where the hell it has been installed, since I like upgrading OH from time to time and it’s a mess if you don’t know where things are.

Therefore, I would like to install all my bindings/actions the old way (placing a .JAR file in the addons folder). Also with the persitence services, if that’s possible.

My questions are:

  1. Where can these 2.x JAR files be downloaded from?? Where are they??
    There is a big .KAR file in the website with all the bindings but I would like to choose individual bindings. I don’t need them all.

  2. Can I just copy the JAR files (even the 1.x files) in the addons folder and OH2 would load them?

  3. Are the latest 1.9.0 bindings the ones that I should use in case there are not OH2 bindings?

  4. What happens (in my hard-disk) when you install a binding with PaperUI. Where does it install it?

2 Likes

I do not recommend this old style installation. Instead of putting the jar files to the addon folder, use the autoinstall feature through text configuration.
Just write down the addons in $CONF/services/addons.cfg and let do openHAB the installation (except the manually added ones). This way you will always get the new addons when updating openHAB itself.
In question of latest OH1 bindings, not shipped with openHAB2, it should be 1.10.0 (https://openhab.ci.cloudbees.com/view/All/job/openHAB1-Addons/lastSuccessfulBuild/)

In fact, if being new to openHAB, maybe you would think: "Why is it so complex to use those old openHAB1 bindings?"
Yes, openHAB2 is more complex to configure if you are an openHAB1 user, but imho starting from scratch is easier.

Hi, Udo

What about the official versions of the bindings?
Aren’t they supplied separately?
I think that is a mistake.
OH2 has brought many good things, but configuration is a mess, even if you start from scratch, I think…

IMO, if PaperUI is not ready to supply all the features that were done via config files, then PaperUI is not useful.
Mixing PaperUI and two types of config files (.json + .cfg) is very confusing. There is a lack of consistency in many operations. I thought that OH 2.0.0 was a release version, but I have the feeling that is yet a promising upgrade of OH1.

What about also about the other questions?

They are not. They are either downloaded on demand (i.e. when added addons.cfg or installed from PaperUI/Habmin) or you can download them all in that .KAR file which downloads them all. See the installation instructions for details.

This is one of the reasons why the old “drop a jar in addons” is no longer recommended. Will have an easier time of upgrades and updates if you use the builtin approach to installing addons rather than the old OH 1.x style.

Yes. And in fact, if you don’t want to use a 2.x version of a binding you don’t have to. You can enable legacy bindings and install the 1.x version even if there is a 2.x version of that binding.

It all happens internally to the Karaf OSGI server. If you didn’t download the offline bindings it goes out to the OH servers (not sure if it goes to Cloudbees or Bintray), downloads the OSGI bundle, and registers the binding. All the changes on disk are made in /var/lib/openhab2. I’m not sure that an actual jar file gets put anywhere (maybe in the cache folder. Instead just a configuration that says “load this OSGI bundle” gets updated.

If you are worried about backups you can be sure to copy both /etc/openhab2 and /var/lib/openhab2 and you will preserve all your configs. However, for OH 1.x migrants who don’t want to use the UIs (note some bindings like the zwave 2.0 binding makes this impossible) to instead use addons.cfg to install addons and make sure to backup that.

Finally, I recommend going through the Migration Tutorial. In addition to explaining some of the above, it shows how to enable the 1.x compatobility, layer which does allow you to just drop 1.x version addon jars into an addons folder. But this will not work for 2.x version bindings.

In fact, if being new to openHAB, maybe you would think: “Why is it so complex to use those old openHAB1 bindings?”

True - But if you’ve errors - like i have with harmony-binding or the actual astro-binding. Then it is a real pain to get rid of them (errors). Because - Errorfixes are available - but it is not possible to explain openhab the version i like to take. And the old JARs are not really easy to come by. Even if there is the possibility to put them into addons folder.

So as long as the release cycle is so slow as it is now - it renders some bindings to uselessness…
Sorry to say - but i am not happy with the “new” way…
Release 2.2 is still unavailable. And some errors are now about 6 Months old.

Also - the second thing is: If i like to add help in form of testing to some stuff - it is nearly impossible without having the development workbench ready and compile the stuff on your own. Neadless to say - this renders in poor quality…

The errors that are fixed are available. You can easily use the unstable version to get rid of all already fixed errors.

What is the recommended approach to put the jars in openHAB 2.4? Thanks in advance.

The recommended approach is NOT to use *.jars :slight_smile:
but to install Add-Ons using the PaperUI
If you must (for whatever reason) install manually an Add-On, just dump it in the addons folder