Understanding openHAB 2 and Karaf


I’m interested in understanding starting openHAB 2 in Karaf/getting it to work. I know, that there are ready-to-go packages, but that’s not what I want to understand (also I don’t mean to use “feature:install openhab-package-minimal”, because it broke my Karaf 4.0.4 installation -or- maybe I do, but… didn’t work with 4.0.4 for me and it looked like it tried to revert back to 4.0.3).

Usually you start Karaf (4.0.4 in this case), throw every bundle you need in the deploy directory (or system or wherever) and then it automagically starts everything (if the requirements are met). I tried to do this with openHAB 2 and I met all the requirements for the bundles I throw in, though it does not look like, that openHAB 2 started and I guess, I’m missing something (besides the standard config files like items and so). Or I don’t see, that openHAB 2 started, because I don’t see it in the logs (Karaf log).

So how do you start openHAB 2? Or did it already started and I did not see it? Which bundles do you need? (I threw in the bundles from one of the ready-to-go openHAB 2 packages from karaf/system.) Which config files do I need to edit and how? How do I know that openHAB 2 started? Do I need to write “demo items” to see openHAB 2 in Karaf? Is there a documentation for that somewhere?

I hope, it’s not too much to ask for. :slight_smile:

Also why I’m asking: I’m trying to get openHAB 2 and universAAL (an ontology-based middleware for ambient assisted living) to work in one Karaf container. UniversAAL shows signs in the logs, though I don’t see openHAB 2 running.

You might get more responses and/or discussion if you post over on the Eclipse Smarthome forums. OH 2, as I understand it, consists of only a few slight customizations of the ESH project. And most of the Karaf stuff will be documented there.

OH 2 consists of only a few slight customizations of the ESH project

This is in general true, but you should note that Karaf is the BIGGEST of these “slight customizations” - there is no info about Karaf at ESH at all, because ESH does not care on which framework/container you are running the bundles.

@ChemBro There isn’t (yet) any support/documentation for running openHAB on a vanilla Karaf. Note that we haven’t even yet managed to get it working with Karaf 4.0.4, see https://github.com/openhab/openhab-distro/pull/147. If you are an expert in Karaf, maybe you can help on such issues?

I made a bad assumption. Given how huge a change it is to move to Karaf I just assumed that was an ESH thing, not an OH 2 thing.

If you are interested in the history, have a look at https://github.com/openhab/openhab2-addons/issues/194.

Unfortunately I’m not an expert in Karaf. But I’ll take a look into the links and I’ll try something. If I get something to work, I’ll let you know.