Recover a broken openhabian setup

  • Platform information:
    • Hardware: RPi3
    • OS: openhabian
    • openHAB version: 3.4

Hi all,
I had the bad idea to try a bundle from the marketplace that messed up my system (vicare Viessmann API).
I tried then to remove this bundle in several ways, but I couldn’t get rid of it.
So I removed the .kar file from the directory and did other things I don’t remember exactly to try to restore my setup.
Here some steps I tried:

  • tried in Karaf to remove the bundle (bundle:uninstall xxx, but it comes back on next startup;
  • tried to remove the kar from Karaf (kar:uninstall xxx) but it simply didn’t do anything
  • tried to remove the feature from Karaf (feature:uninstall xxx) also didn’t do anything

Well, long story short is that now nothing is working.

As I use only text based config files, I have a backup of the openhab-conf directory and of the persistence files that I need.

Is there a way to restore the openHabian configuration to its defaults? Like a first installation?
I don’t want to reinstall the full openhabian from scratch as I would lose some other components I have in this RPi, so I would like to understand how to:

  • remove the previous openhab configuration
  • restore a fresh openhab installation
    then I will do:
  • start this new installation, install the binding that I need and stop it
  • copy over my openhab-conf and persistence files
  • restart

openhabian ( image ) - if I would be asked to describe it - is an image that provides a linux installation together with the ‘script collection’ openhabian-config.
This is being used to setup openhab.
As far as I understand you destroyed / misconfigured you openhab installation - so the problem is with your openhab setup. Not with the linux image and not with openhabian-config itself.

What I would try is:

  • make sure you have a backup of all relevant openhab settings and your persistence data ( pay attention to not delete your backup, persistence data in next steps without storing them in a separate directory ); steps are on your own risk

  • it might be enough to reinstall openhab, openhab-addos packages

sudo apt reinstall openhab openhab-addons
  • if the previous one does not work then:

  • deinstall the packages openhab, openhab-addons

  • make sure that /etc/openhab is remove as well

  • remove /var/lib/openhab

  • install openhab, openhab-addons

  • restore your backup

Hi Wolfgang,
Thanks for your reply.

Actually I need to recreate the openhab-userdata directory.
The addons is fine.