I have some legacy hardware that require 1.x bindings. To transition to OH3, my goal is to manage the legacy hardware via an OH2 outpost (the outpost will run in docker).
The outpost container starts just fine and tries to install the jars that I have placed in the addons folder. However, I get the error
Unresolved requirement: Import-Package: org.openhab.core.binding
How do I get this package? Is it part of yet another jar? (I’ve installed all jars from openhab-addons-2.5.12.kar and openhab-addons-legacy-2.5.12.kar.)
Thank you for any pointer!!
Why don*t you use the official Docker Container? There still is one for openHAB2.5.12.
Do you know about the openHAB Addon? This is meant to control another openHAB Server, (especially a OH2.5 Server, to provide Bindings, which are no longer available)
thanks for your reply. What you’re indicating is exactly what I’m doing and going for.
I’m using OH 2.5 (official docker container) for the sole purpose of being an outpost providing access to legacy bindings. I’m sure the “openHAB addon” you mention is the addon called “openhab remote”, which lets OH3 accesss my outpost.
My problem is: The outpost seems to be missing some packages that are required by the legacy bindings.
Cheers and looking forward to more input!
Hmmm, that namespace doesn’t look right. For OH 2.x I think it was
org.eclipse.smarthome.core.binding. Are you sure those 1.x bindings were compiled to run on 2.x? I can’t remember if a 1.x add-on could run on 2.x unmodified. I think I remember there needed to be some refactoring to change the namespaces to the org.eclipse.smarthome root package.
Ironically, 3.x went back to org.openhab as the root.
If your intent is to use these, just put the
kar file itself in your addons folder and when you install an add-on, OH will install it from that kar instead of going out to the internet to download it. You’d only need to install separate jar files into add-ons if it’s a different version from what’s in the kar file (or online) or if it’s not an official add-on you got from a third party.
That could be your problem.
thanks for coming back to this. ATM i can’t check if your advice will work, but def will give it a try and report back.
A few days back i could make it work ‘by hand’:
- Start a bare container (no mounts, no nothing)
- ssh into it’s console to activate the 1xcompat feature
- docker cp addon jars into the container, one by one, in the correct order
As you can see, your approach is preferred.
There’s only one thing that I could not find out: how do you enable 1xcompat by config (instead of having to activate the feature on the console).
As far as I’m aware, the bundle will activate as soon as you install a binding that depends upon it. The add-ons define what they depend upon so should activate stuff on their own, but only when properly installed through the API. If you just drop the jar file into the addons folder you’ll have to activate the add-on’s dependencies on your own.
I remember this was a problem with the Zwave binding which depends on the serial device bundle.