OH3 - manually add binding (jar)

What is the proper way to manually install a binding (one that I created) in OH3.1 on openhabian? What I did was this:

  1. Copied my org.openhab.binding.ccaedio-3.1.2-SNAPSHOT.jar file to the /usr/share/openhab/addons directory via binary FTP
  2. Changed ownership to openhab:openhab
  3. Modified the /etc/openhab/services/addons.cfg to uncomment and modify the line binding=ccaedio
  4. Restarted openhab using sudo systemctl restart openhab

After doing that, the only message in either log was in the openhab.log file that said "The binding add-on ediocca does not exist - ignoring it". I also tried using the full jar file name.

What is even worse, all of my bindings were removed. When I looked at the Settings->Bindings screen, where I should see 9 installed, it sad there were no bindings! After reversing my steps above, the bindings were still missing; I had to restore from a backup and reconnect any items with their associated bridges by modifying each one.

I have OH3.1.0 installed, is the binding being 3.1.2-SNAPSHOT causing the issue? What is the proper way to manually install a custom binding? If this was right, why didn’t it work? If there were some issues like missing dependencies, why wasn’t it in the log? And finally, why did it wipe out my installed bindings (all of which were installed via the web interface)?

Only step 1 above is required. Step 3 is pointless because that only works for official bindings. Step 4 is really not necessary but won’t hurt.

This is because of step 3. You essentially told openhab to just load that one (invalid) binding, and nothing else

Yes because your binding=ccaedio that you added was then cached. You’d need to reinstall your binding via gui, or list them in binding= inside addons.cfg

Just put the jar inside /addons/ folder. That’s really all there is to it.

I have kind of the same problem and I don’t know what to do next. I am a beginner and try to install my first binding manually. It is not an official one.
I work from my Windows PC and was able to insert a .jar file on the right folder
with:

cd /usr/share/openhab/addons

sudo wget “https://github.com/andrasU/openhab-free-home-binding/blob/main/org.openhab.binding.freeathomesystem-3.4.0-SNAPSHOT.jar”

But I am not able to add things with this binding. Nothing happens.
I also tried do change the user with

sudo chown openhab:openhab org.openhab.binding.freeathomesystem-3.4.0-SNAPSHOT.jar

I can also say that it worked. I viewd the document in the midnight comander to check the owner.
Without the chown command it was root with group root. With the chown command it is openhab and openhab.

I restarted the system with both owners. But Nothing happend.
Do you have any idea?

Thanks in advance.

1 Like