openHAB development setup

Hi,

I’m new to java nad openHAB. I would like to setup development enironment using eclipse preferably on linux (can be on windows).
I followed the instructions from here:

I fail in the step ‘Modifying and Debugging Add-ons’. I cannot import the addon project to eclipse workspace. The import dialog simply says there is no project to import. I use the root path - ‘(…)\openhab\git\openhab-addons\bundles\org.openhab.binding.linuxinput’.

Could anyone explain, what I need to do in order to modify an addon, build it, run and debug it?

That is inaccurate for the soon to be released openHAB 3.

I have marked this thread as Development to get further assistance.

You need to import the project as maven project. This is unfortunately not yet in the documentation, even while the text is already updated.

Do you refer to this PR?

If yes, it is only available in the openHAB 3 docs currently.
We could cherry-pick it into 2.5.x docs if needed.

I followed the original URL on next.openhab and saw the same OH2 doc. I was going to refer them there until I realized it was also incorrect.

Thanks, that works better. However, now I have the following problem when trying to resolve dependencies or when trying to run OSGi:

Resolution failed. Capabilities satisfying the following requirements could not be found:
⇒ osgi.identity: (osgi.identity=org.openhab.binding.linuxinput)
⇒ [org.openhab.binding.linuxinput version=3.0.0.202012131406]
⇒ osgi.wiring.package: (&(osgi.wiring.package=jnr.ffi.annotations)(version>=2.1.0)(!(version>=3.0.0)))
⇒ [com.github.jnr.ffi version=2.1.9]
⇒ osgi.wiring.package: (osgi.wiring.package=com.kenai.jffi)
[com.github.jnr.enxio version=0.19.0]
⇒ osgi.wiring.package: (osgi.wiring.package=com.kenai.jffi)
[org.openhab.binding.linuxinput version=3.0.0.202012131406]
⇒ osgi.wiring.package: (osgi.wiring.package=com.kenai.jffi)

I added the following in pom.xml:

<dependency>
  <groupId>org.openhab.addons.bundles</groupId>
  <artifactId>org.openhab.binding.linuxinput</artifactId>
  <version>${project.version}</version>
  <scope>runtime</scope>
</dependency>

and now would like to debug the linuxinput addon, any hints?

I started playing with 2.5.x and another addon which does not have the problem with com.kenai.jffi - tplinksmarthome.
I can import the project not as a Maven. It builds, runs and I can debug it. However, the problem is that it does not run my local version of the plugin.

How can I add the local jar file as a dependency and debug it?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.