All extensions uninstall automatically when changing addons.cfg

Fancy behavior discovered:

When I changed the addons.cfg in the conf folder, all extensions (including ALL UI extensions, which also includes Paper-UI) are getting uninstalled.
I can see this in the paper UI (messages appear Extension XXX uninstalled) and at the same time in log:tail in the karaf console

As a result, I cannot use OpenHAB2 anymore.

Is there any option how I can get the stuff back?

After reboot (or restart) of OpenHAB, all is empty (Welcome to openHAB 2.0, no UIs to select from)

Build is 2016-12-05 (I think).

How does your addons.cfg look like? Do you have an “ui=” entry in it?

I realized this too. Only the entries in the addons.cfg are left untouched. All manually installed bindings by paper ui are uninstalled.

Now, yes - before no.

I just had one binding assigned in the cfg file (piface).
I just needed to add the persistence services there.
I had to add all extensions to the addons.cfg file, now not using the Paper-UI anymore.

The “mixed mode” is somewhat crappy. How about updating the addons.cfg when the paper-ui installs/uninstalls any extensions?
This would prevent this bahavior, or:
Load settings from both sources (db and cfg) and combine them, not let the cfg overwrite the db settings completely.

It’s not a bug, it’s a feature, see here. Entries in addons.cfg always have priority. If you do not want this, remove the entries (or put them in comments).

1 Like

I’m kinda have the save behavior, but I’m using the paper UI, Adding the my.openhab extension. I get it all setup and working and then issue a sudo shutdown -r and then all the changes I made thru the paperUI are gone.

Well, I rebuilt my pi os and reinstalled and now its working after reboot. Now to add all the other extensions.

I just found this easter egg in the current release version of openhab2.

Kind of scary. You add one binding entry into addons.cfg and it uninstalls every other binding in your system. Paper UI is nice, but if it can be sabotaged this easily I am very tempted to just try adding all my binding entries in addons.cfg instead so they are stable (assuming that would work).