[SOLVED] How to uninstall / disable a binding "the hard way" (here: networkupstools)?

Hi,

I just upgrade from 2.5.0M3 to RC1 and as now I get frequently this error message:

[ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-networkupstools1'

I investigated a bit via karaf:

openhab> feature:list | grep ups
openhab-binding-networkupstools                   x 2.5.0.RC1        x x        x Started     x openhab-addons-2.5.0.RC1 x Network UPS Tools Binding

It looks like the binding it complains in the logs about is not the same as in the feature list (looking at the trailing “1”).

An uninstall does not seem to work:

openhab> feature:uninstall openhab-binding-networkupstools1
Error executing command: Feature named 'openhab-binding-networkupstools1/0' is not installed

As I cannot find it in the karaf feature list, I’m wondering what the hard way of getting rid of this old binding is…

Looking forwards to some hints.
Thanks.
BR,
Alex

The trailing 1 indicates a v1 binding. You have the v2 binding installed. It is probably reverenced in addons.cfg or some other configuration file. Locate the offending file, stop OH, edit the file appropriately, restart OH.

Do you see the binding in /var/lib/openhab2/config/org/openhab/addons.config ?

If so you can try stopping OH first and removing it then clean cache and restart.

1 Like

OH restart should not be needed, the rest is correct.
The usual location would be in services/addons.cfg, but eventually you’ve statically put up a jar into /usr/share/openhab2/addons/.

1 Like

Thanks!

The issue was that the binding was referenced in this file that I was not aware of:

So to sum it up, there are two addon config files:

  • /var/lib/openhab2/config/org/openhab/addons.config, which is also via mount available at /srv/openhab2-userdata/config/org/openhab/addons.config
  • /etc/openhab2/services/addons.cfg, which is also via mount available at /srv/openhab2-conf/services/addons.cfg

Sorry - I had to restart. But now it works fine! :+1::grinning:

Thanks everyone!!

3 Likes

FYI for others Never make a change to this file with openhab running!!!

Glad you got it working.