How to install dependencies of binding in manual installation


I’m using openhabian 3 in a rasperry pi. I started developing a binding that automatically generates things, items and sitemaps. It gets the info from another system in my apartment that already handles all of my [current] devices. Since it is too tailored to my apartment, I don’t plan to submit the code to openhab binding repository (which would add more work).
My binding uses the dependency okhttp (and its transitive dependencies). The version I’m using is already used by other bindings in openhab repository.
When I install the jar of my binding in openHAB-sys\addons, openhab complains as it cannot find the dependency okhttp. Copying the okhttp jar file in that same folder, along with the jars for the transitive dependencies, does not help. Where should I put these jars? Maybe in openHAB-sys\runtime(bin¦etc¦lib)?


That is the way it is normally done.Version issue or corrupt jar files?

I got the jars directly from eclipse libraries, and the binding works fine in the dev server there. The only error message I get in the logs in openHAB-logs\openhab.log is:

Unresolved requirement: Import-Package: com.squareup.okhttp

Is there any other log that can give me more info?

Did you add that jar too?

That’s version 3. I added version 2.7.5:
I also added okio:
Finally I added

1 Like

To close the thread, I didn’t manage to get it running. I decided to just get rid of the okhttp dependency as that was faster than finding a solution. Without this dependency, my binding works. I was confused by the fact that the binding didn’t show in the list of installed bindings in Settings > Bindings, but adding a thing + items just works.

It should show in Karaf’s bundle:list.