OH 2.5.12 docker outpost for legacy 1.x bindings


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!! :slight_smile:

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)

Hi Udo,

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.

Hi Rich,

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. :slight_smile:

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).

See you

           _ _ _            __ _              _   _                        _               _                   _                
   ___  __| (_) |_    __ _ / _| |_ ___ _ __  | |_| |__  _ __ ___  __ _  __| |   __ _ _   _| |_ ___         ___| | ___  ___  ___ 
  / _ \/ _  | | __|  / _  | |_| __/ _ \  __| | __|  _  |  __/ _  / _  |/ _  |  / _  | | | | __/ _ \ _____ / __| |/ _ \/ __|/ _ \
 |  __/ (_| | | |_  | (_| |  _| ||  __/ |    | |_| | | | | |  __/ (_| | (_| | | (_| | |_| | || (_) |_____| (__| | (_) \__ \  __/
  \___|\__,_|_|\__|  \__,_|_|  \__\___|_|     \__|_| |_|_|  \___|\__,_|\__,_|  \__,_|\__,_|\__\___/       \___|_|\___/|___/\___|

This is my ‘final’ solution that I want to share to wrap this up. It’s now 2022-10-22.

Hi everybody,

thank you for looking into this. For me, openhab-addons-legacy-2.5.12.kar does not contain the bindings that I need, i.e. cul and fht.

I have solved it like this with docker-compose:

    image: openhab/openhab:2.5.12
    container_name: openhab25outpost

    # other stuff not relevant for this post

      - "./openhab25outpost/conf:/openhab/conf"
      - "./openhab25outpost/openhab-addons-2.5.12.kar:/openhab/addons/openhab-addons-2.5.12.kar"
      - "./openhab25outpost/org.openhab.binding.fht-1.10.0.jar:/openhab/addons/org.openhab.binding.fht-1.10.0.jar"
      - "./openhab25outpost/org.openhab.io.transport.cul-1.14.0.jar:/openhab/addons/org.openhab.io.transport.cul-1.14.0.jar"
      # other volume mounts not relevant for this post

# other services not relevant for this post, e.g. the main openhab3

After the first start of the container, I have to manually do this from the Karaf console:

feature:install openhab-runtime-compat1x
feature:install openhab-core-io-transport-serial-rxtx
feature:install openhab-transport-cul1

Two downsides are still left that I can live with for now:

  • it’s still some manual steps, that I would like to automate (or better, to be taken care of by OH)
  • lots of error logging remains that the features cannot be loaded–despite they’re working fine

Thanks again!

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.

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