Unable to install locally developed binding

Hi,

So I’m very new to openHab. I’m developing my own binding to match the needs for my apartment. I have it running in eclipse IDE and now I’d like to install it in my recently bought raspberry with openhabian. I have 2.5 installed there. I have located the jar file for my binding which is called org.openhab.binding.mybinding-3.0.0-SNAPSHOT.jar
I copied the jar into the addons folder and I’m getting the following error in the logs:

Unresolved requirement: Import-Package: org.openhab.core.library.types

at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
...

Any idea how to fix it?

Thanks,
Edu

openHAB 3.0 bindings are not compatible with 2.5. To make this work you need to install 3.0 or port your binding back to 2.5 by reversing how to migrate from 2.5 to 3.0. See Guide: Binding development changes for openHAB 3 (from 2.5.x)

1 Like

Thanks. I have no idea how I got to 3.0. Certainly not consciously. Maybe this is the reason why paper UI does not work when starting the server from within eclipse. Would you recommend to install 3.0 or port the source code to 2.5?

3.0 is not released so it’s still in development. So if you have a stable 2.5 and don’t want to invest in migrating just go for 2.5 to limit the number of changes you have to cope with. Porting the code to 3.0 later on isn’t to much work, so you can always do that later.