Creating a Binding Skeleton for OpenHAB2

Hello,

I’m interested in OpenHAB2 binding development. What I’d like to do is see if I can take an OpenHAB1 binding (InsteonPLM) and “convert” it to a native OpenHAB2 binding. (I’m not a developer, nor am I familiar with Java.)

To setup my IDE, I followed the instructions here: https://www.openhab.org/docs/developer/development/ide.html

I then went to: https://www.openhab.org/docs/developer/development/bindings.html

However, I’m stuck. When I try to create the skeleton, my output looks like this:

Does anyone have have any ideas what’s going on and how to solve it? The instructions don’t say anything about manually creating a directory, so I’m wondering if I’m missing a step.

Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/plexus/logging/LoggerManager
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
	at java.lang.Class.getMethod0(Class.java:3018)
	at java.lang.Class.getMethod(Class.java:1784)
	at org.codehaus.plexus.classworlds.launcher.Launcher.getEnhancedMainMethod(Launcher.java:172)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:268)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.logging.LoggerManager
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
	... 10 more
cp: directory org.openhab.binding.insteonplm does not exist

Regards,
Burzin

Its better to copy and paste (in eclipse) an existing but simple OH2 binding, like airquality. And then start putting your stuff in it.

Hi @diyha,

Thanks, I think I figured it out. My installation of Maven was corrupted. I’m not sure how this happened, but I reinstalled Maven and the skeleton script ran.

Regards,
Burzin

@Burzin_Sumariwalla

Just wondering if you got anywhere with the 2.x binding for InsteonPLM?

With support for 1.x bindings likely to be dropped soon, the need for bindings to be ported to 2.x is getting urgent…

Hi Nicholas-- live has intervened, and I haven’t gotten anywhere with it. I wasn’t aware that 1.x binding support was going to be dropped soon though.