How to install a 2.X binding manually? (In this case KNX)

I’m using openHAB 2 with KNX Binding 1.9 and I’ve got loops on my KNX bus: see Loops on KNX bus

I was hoping that this is fixed when I use the current build of KNX Binding 2.0. So I tried to build the JAR that everybody here is talking about. Without success.

What I did:

  1. I installed Eclipse as detailed in “Setting up an IDE for openHAB
  • I checked “openHAB Development” and “openHAB 2 Addons”
  1. Then I checkout your repo from https://github.com/kgoderis/openhab2 into a separate folder
  2. Then I switched to your knx-refactor branch
  3. Then I copied your org.openhab.binding.knx folder besides all the other OH2 addons I got with the IDE setup (git/…/addons/binding)
  4. Then I imported org.openhab.binding.knx as an existing project into eclipse → no errors
  5. Then I changed the two “version” flags in your pom.xml from 2.0.0-SNAPSHOT to 2.1.0-SNAPSHOT (otherwise parent won’t be found)
  6. Then I added org.openhab.binding.knx to the pom.xml of the parent binding directory
  7. Then I called “mvn install” from “openhab-distro”
  • The resulting KAR file in “openhab-distro/distributions/openhab-addons/target” only contains the 1.10 version of the knx binding - no idea why. I was hoping to find your 2.0/2.1 binding here somewhere
  1. Then I called “mvn package” from the org.openhab.binding.knx folder → a jar got build

  2. I copied the JAR to /usr/share/openhab2/addons (owner and group openhab)

  3. I set “binding = knx” instead of “binding = knx1” in my addons.cfg

  4. I restarted openhab

  5. Then I got this log output:

    21:46:40.304 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
    21:46:41.024 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
    21:46:41.907 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
    21:46:42.264 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
    21:46:42.403 [ERROR] [org.openhab.binding.knx ] - FrameworkEvent ERROR - org.openhab.binding.knx
    org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.knx [190]
    Unresolved requirement: Import-Package: gnu.io
    at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

Okay, enough trial and error!

@kgoderis:
Could you please tell me what I REALLY have to do to build your KNX Binding 2.0 ???
Or could you set up a small git repo etc. which always contains the latest JAR you built (would be helpful for anybody here) ?
If none of the two, could you please send me your latest jar to stephanschuster at web de

Thank you.