[Solved] OH3: How to get rid of old bindings?

Hi everyone,
I migrated vom OH2.5 to OH3 via openHABian - and so far most of the things work fine.
But I discovered these lines in the logs:

2020-12-23 17:12:59.430 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'exec1' does not exist - ignoring it.

2020-12-23 17:12:59.438 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'http1' does not exist - ignoring it.

2020-12-23 17:12:59.461 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'serial1' does not exist - ignoring it.

2020-12-23 17:12:59.634 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'restdocs' does not exist - ignoring it.

2020-12-23 17:12:59.644 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'paper' does not exist - ignoring it.

In OH2, these bindings were activated by an entry in the addons.cfg file in this line:
binding = mqtt,exec,exec1,harmonyhub,netatmo,network,ntp,serial1,systeminfo,daikin,openweathermap,http1,unifi

But now my addons.cfg is empty (except a “package=standard”) - and I ask myself, where the information comes from to install these OH1-bindings. Where can I change this?

I already checked /var/lib/openhab/config/org/openhab/addons.config, but these bindings are not listed there…

Thanks,
Boby

Have you tried to shutdown the OH service then you can delete the cache and the tmp folder content.

see e.g.: Clear the Cache

Have done this a few times now, but I can try it one more time as well

Still there:

2020-12-23 18:27:33.055 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'exec1' does not exist - ignoring it.

2020-12-23 18:27:33.064 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'http1' does not exist - ignoring it.

2020-12-23 18:27:33.080 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'serial1' does not exist - ignoring it.

2020-12-23 18:27:33.248 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'restdocs' does not exist - ignoring it.

2020-12-23 18:27:33.259 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'paper' does not exist - ignoring it.

When I look at the karaf console, the claimed features aren’t installed at all:

openhab> feature:list | grep exec
openhab-binding-exec                              x 3.0.0            x x        x Started     x openhab-addons-3.0.0     x Exec Binding
openhab-transformation-exec                       x 3.0.0            x x        x Started     x openhab-addons-3.0.0     x Exec Transformation
openhab>

I have no idea where this warning comes from…but obviously some task tries to load these addons…

If you can’t find the file, just fix the configuration using the Console like this:

fix

No restart required! :slight_smile:

Commands used in the “movie” :popcorn: :film_projector:

config:edit org.openhab.addons
config:property-list 
config:property-set ui basic,habpanel
config:property-set binding astro
config:property-list
config:update
13 Likes

Thanks, that’s amazing. It almost worked - until the final step: When I post the config:update command, I get:

Error executing command: /var/lib/openhab/etc/org.openhab.addons.cfg (Datei oder Verzeichnis nicht gefunden)

(file or directory not found)

Any idea why this happens?

Strange…this file was missing in the directory. Maybe a bug in the migration routine of openhabian?

I created it (using touch) and changed the owner to openhab; owner, group and right are now the same as most other files. After I did this, the config:update was working without troubles and now holds the expected config information.

Now I’ll risk a restart :wink:

Success! After creating the missing file and applying @wborn 's changes in the config, the problems are gone now. Thank you for your support!

1 Like

Great! :slight_smile: I don’t know why it complains about the missing file with openHABian. It doesn’t complain about it with the Docker and .zip distros which I mostly use.

Especially for the UIs problem is that runtime.cfg's ui = ... line is commented out. Just re-add this line and don’t include the UIs that aren’t existing anymore, this will overwrite saved config in /var/lib/openhab/config/org/openhab/addons.config and make the error message go away (at least it did it for my installation)

But for getting rid of legacy and action keys you will have to fix it using console as @wborn pointed out. Maybe this should be included in Migration to openHAB 3 | openHAB?

In my installation the file was also missing, after I touched it and restarted openhab the console just says the following:

openhab> config:edit org.openhab.addons
openhab> config:property-list
   package = standard

Is this normal @wborn?

1 Like

Only if you’ve uninstalled the add-ons that are part of the “standard” package. Otherwise it should also list them:

openhab> config:property-list
   package = standard
   persistence = rrd4j
   ui = basic,habpanel

Hi, I’m slowly getting to upgrade. Thanks for the tips here. However it seems in my /var/lib/containers/exported_volumes/openhab_userdata/config/org/openhab/addons.config it has wrong path to “itself”:

:org.apache.felix.configadmin.revision:=L"16"
binding="kodi,wol1,network,astro,expire1,mqtt,openweathermap,lgtv1"
felix.fileinstall.filename="file:/var/lib/openhab2/etc/org.openhab.addons.cfg"
legacy="false"
misc="market,ruleengine"
package="standard"
persistence="influxdb"
remote=B"true"
service.pid="org.openhab.addons"
transformation="map,jsonpath"
ui="basic,paper,habpanel"

There is no such file as file:/var/lib/openhab2/etc/org.openhab.addons.cfg

Should I make it point to the file itself instead? That would then be /openhab/userdata/config/org/openhab/addons.config

Also, did you already find replacements for the rule-engine and expire1?

Not really succeeding removing the misc items:

openhab> config:edit org.openhab.addons
openhab> config:property-list 
    = org.apache.felix.configadmin.revision:=L"16"
   binding = "kodi,network,astro,mqtt,openweathermap"
   felix.fileinstall.filename = "file:/openhab/userdata/config/org/openhab/addons.config"
   legacy = "false"
   misc = "market,ruleengine"
   package = "standard"
   persistence = "influxdb"
   remote = B"true"
   service.pid = "org.openhab.addons"
   transformation = "map,jsonpath"
   ui = "basic,habpanel"
openhab> config:property-delete misc
openhab> config:update 
Error executing command: Key [] must not be an empty string
openhab> config:property-list
    = org.apache.felix.configadmin.revision:=L"16"
   binding = "kodi,network,astro,mqtt,openweathermap"
   felix.fileinstall.filename = "file:/openhab/userdata/config/org/openhab/addons.config"
   legacy = "false"
   package = "standard"
   persistence = "influxdb"
   remote = B"true"
   service.pid = "org.openhab.addons"
   transformation = "map,jsonpath"
   ui = "basic,habpanel"
openhab> config:property-set misc ""
openhab> config:property-list
    = org.apache.felix.configadmin.revision:=L"16"
   binding = "kodi,network,astro,mqtt,openweathermap"
   felix.fileinstall.filename = "file:/openhab/userdata/config/org/openhab/addons.config"
   legacy = "false"
   misc = 
   package = "standard"
   persistence = "influxdb"
   remote = B"true"
   service.pid = "org.openhab.addons"
   transformation = "map,jsonpath"
   ui = "basic,habpanel"
openhab> config:update
Error executing command: Key [] must not be an empty string

answering myself, forget the config editor. I did the changes to file directly after shuttind down the container, and complaints are gone now.

If this still works like OH2, addons.cfg is the “real” user master file,and that is where you should make edits etc. addons.config is a system generated “cache” or working copy…
They can get out of step, and the cure was to delete addons.config, while OH is stopped. It should then be re-created from addons.cfg next boot.

2 Likes

Thanks for the answer. I now took a look at the addons.cfg. It has nothing set, it’s commented out file, these two files are rather similar:

/openhab/dist/conf/services/addons.cfg
/openhab/conf/services/addons.cfg

where as /openhab/userdata/config/org/openhab/addons.config seems to have the configs that caused the complaints. So I’ll just in case cat the addons.config to the end of /openhab/conf/services/addons.cfg which atm has none of those things set. Just to be safe if the cache gets cleaned.

Good tip.

I was coming from OH2 on an Ubuntu install, and had to do this:

touch /var/lib/openhab/etc/org.openhab.addons.cfg
sudo touch /var/lib/openhab/etc/org.openhab.addons.cfg
ll /var/lib/openhab/etc/org.openhab.*
sudo chown openhab:openhab /var/lib/openhab/etc/org.openhab.addons.cfg
ll /var/lib/openhab/etc/org.openhab.*

After that the config:update worked fine: