Configuration location

Where is the server based configuration file located and is there any way to restore this easily after an update to a new snapshot of openHAB 2?

Before I update I delete the following folder structures:

..openhab\runtime
..openhab\userdata\cache
..openhap\userdata\tmp

Currently, I make sure that I save the configuration locally on my clients but this is a bit risky as I am planning a couple of different configurations (for different clients i.e. mine and the Wife’s version) and during the beta phase of openHAB 2, I am updating weekly (at least)?

A good solution would be to store the HABpanel configuration data somewhere in the ..openhab\conf\ folder structure if this is possible.

There are lots of configuration files. Which one do you mean by “server based configuration”?

There are the obvious configs in conf. There are a lot also scattered around openhab\userdata

The location for the confgiurations of the HABpanel dashboards. These are currently hidden somewhere else tgat gets deleted before updating openHAB 2.

HABPanel is a third party UI for openHAB, not part of the OH project itself (as far as I can tell, I could be wrong as I can’t get to my PaperUI right now).

Perhaps @ysc can provide some hints.

You can at least view it with the Karaf commandline with:

openhab> config:list "(service.pid=org.openhab.ui.habpanel)"

Don’t know how it is persisted behind the scenes.
I also found it in a cache file: cache/org.eclipse.osgi/7/data/config/org/openhab/ui/habpanel.config
but it doesn’t look like permanent storage.

I believe you can control it by putting a line like
panelsRegistry=...
in runtime/karaf/etc/org.openhab.ui.habpanel.cfg but you’ll have to put it all on one line, that could become ugly quick.
Sorry, I have no experience with Karaf/OSGi, so I can’t help you on backup & migration procedures.

Thanks for the reply. I will do some experimentation in the weekend to see if I can find a solution to the problem and report back.

Hi Mike!

I have just upgraded to the latest snapshot of OH2. Apparently I lost my Habpanel configuration. Do you know if its possible to retrieve the config from a conf/userdata backup? I made a backup just before upgrading.

Also, the Habpanel now does not allow me to select a server side configuration?! Has something changed in a later version? As a side note I could now install Habpanel without enabling experimental features.

Its quite tedious to setup a Habpanel dashboard so the possibility to make a backup would be great.

Also, why did you delete the folders mentioned in the first post? Is that a recommended step before updating?

Thanks!

No, but the following works for me assuming that you originally had the configuration loaded on your browser.

I simply open HABpanel, then click on the configuration icon. Initially this does nothing but if you then refresh the browser screen I have found it to return the configuration (providing you have not cleared the browser cache). You can then go on to save to the server again in the normal way.

Yes, this is the recommended practice, but I am aware that work is being done to improve the updating process. I will try to find a link on this and will add it shortly.

I’m also interested in a server side installation. The feature does not appear to be in the config any longer.

Has there been any progress with this?

Has anyone found if there is an actual storage or a way to export the dashboards? dont want to upgrade and lose all the config that has been done

Click the expand menu icon (i.e. the three horizontal lines in the upper left corner)

Click the gear icon near the bottom left

There you can choose to save your panel config locally (i.e. for that browser) or on the server. On the server the configuration is stored somewhere in userdata (/var/lib/openhab2 for apt-get installs).

In an upgrade the userdata folder is preserved when using apt-get.

When using a manual install, make a backup of userdata and copy the backup of your userdata folder to the new version of OH before starting it and all your settings will be preserved.

Thanks, found it at /var/lib/config/org/openhab/habpanel.config

1 Like

Do you mean:
/var/lib/openhab2/config/org/openhab/habpanel.config
?

There is a radio button for local storage but no way to toggle to something like ‘store on server side’.

This saves it to the server

This is how it looks here …

Have you tried the “Save the current configuration” link?

From the documentation:

  • Once you’re happy with your set of dashboards, go back to “Advanced settings” then click/tap on “Save the current configuration to a new panel configuration”; this will store it on the openHAB 2 server as described above, and make it available for reuse

Sorry, my fault. I missed this step.