[OH3] Habpanel shows old version after migration from OH2.5 to OH3

Before migration from OH2 to OH3 I created a backup and I restored it partially later on.

For HabPanel this didn’t work as HabPanel under OH3 doesn’t show the last, backuped version, but some (very) old version of the Habpanel config.

Doublechecked the /var/lib/openhab/config/org/openhab/habpanel.config and found some elements for them I know were created quite short before migration, and I found them written in the file.

Could it be that OH3 doesn’t load the config from the above mentioned file but from another place (where there might be an older version stored)?

openHAB 3 does not look there. It likely looks at /var/lib/openhab/config/org/openhab/habpanel.config The 2 was dropped from the openhab directory name.

Of course you’re right, this was a typo… It also doesn’t work when copying the backuped file to /var/lib/openhab/config/org/openhab/habpanel.config

The new configuration path seems to be $OPENHAB_USERDATA/jsondb/uicomponents_habpanel_panelconfig.json. Unfortunately the file uses a different format (JSON); moving the 2.X file to the new location probably won’t work.

It’s possible that the “old” version you are seeing is just saved within your browser (cookies, etc.).

I also have the problem that I want to convert my HabPanel configuration for openHAB 3. I would also be interested in a solution how to preserve the habpanel configuration (then as JSON).

1 Like

Ok, so I got it working by:

  • installing openHAB 2.5.11 locally on my Windows 10 machine
  • loading my backup of openHAB 2.X
  • opening HabPanel → Settings → Edit local panel configuration → Export
  • opening the “new” HabPanel (of the openHAB 3 instance) → … → Import

Ta-da, the $OPENHAB_USERDATA/jsondb/uicomponents_habpanel_panelconfig.json file is updated with the correct content!

2 Likes

Many thanks. This worked as a workaround.

Anyway this should get fixed as well… Ticket is opened under HabPanel doesn't load habpanel.config after migration to OH3 · Issue #700 · openhab/openhab-webui · GitHub

Hi Guys,

I tried this the same way (and did before when starting from scratch).
Unfortunately I am not able to open the config - so editing is impossible:
The edit button does not show up (yellow circle):


neither the settings wheel on top right of the screen shows up.

This is the case for both:
http://192.168.68.28:8080/habpanel/index.html#/
as well as
http://192.168.68.28:8080/static/habpanel/index.html#/
with all my stuff in /etc/openhab/html/habpanel…
(I extracted the most recent habpanel package here).

Any suggestions what might be wrong?

Just change the “view” within the URL to “edit” and you’ll get to the edit page…

Thanks a lot.
I didn’t know that trick.

Unfortunately changing the config ist still not possible:

I can open “Edit the local …” and can paste my previous config.
According to the reponse it has been saved, but I cannot store it locally under a new name.

EDIT:
Maybe this will work
(I just saw that you had the same issue once :wink:

EDIT II:
Unfortunately I did not find the habpanel.config in
/var/lib/openhab/config/org/openhab
all other bindings have the config here…

Just to close my open case here:
I ended up with a black screen instead of any configurable panel.
(this issue can be found several times here in the forum when looking for black screen on habpanel.

I just soved this by shutting down OH3, deleting the (potentially corrupt) config file which is nowadays this one (OH3) and starting OH3 again:
/var/lib/openhab/jsondb/uicomponents_habpanel_panelconfig.json

Too early happy:
After the steps above was able to import my OH2 json.
However, because I use custom icons I usually extract the habpanel stuff into /etc/openhab/html/habpanel, which I also did.
Unfortunately after that (and fixing permissions with openhabian-config to be on the same side), I was not able to change anything on the habpanel config anymore:

So, what could prevent me from editing the config?