Migration - 2.5.11 to OH 3 - HabPanel

Hi there,

I recently migrated from OH 2.5.11 to OH3 stable (apt update on Raspi 3B+). After migration I could solve all upcoming issues like telegram action/binding, executing Python scripts, tail log viewer but I am still struggling with HABPanel. After migration I found that I should have exported my HABpanel configuration first to import the configuration later in OH3. Anyway I solved this as well by installing OH 2 on Windows and exporting the HABPanel configuration.

Unfortunately HABPanel is still not working in OH3. After logging in to the MainUI and starting HABPanel the message “No default panel configuration” is shown without the possibility to import my prior exported json configuration file. I don’t have the “gear” icon (mentioned in some posts which also discussed a not working HABPanel). I have enabled “Allow Basic Auth” in the settings and I also have enabled “Implicit user role …” (without enabling “Implicit user role …” HABPanel starts with the red message “connection lost, trying to reconnect”). Maybe the described behaviour is related to some auth issues - but where to start ? (tried so far: cleared the cache, Pi rebooted, different browser, uninstalled and reinstalled HABPanel, read related postings). It would be nice to get HABPanel back.

Any help is very much appreciated. Thank You.

If you are shown the No default panel configuration there should be a ‘Panel Settings’ button to click. It would be odd to have no way to get to the settings portion of HabPanel.

As for the json export you have to click a small link under the ‘Local Storage’ option of the settings, says (Experts only):
image
This will open the import screen to paste the json into.

It’s odd …

I also tried different urls to open HABPanel like myhab:8080/habpanel/#/ resp. myhab:8080/habpanel/
like described in different HABPanel related postings. But all with the same result. And: I did export the HABPanel configuration under Windows and have the habpanel-config.json on hand. But no way to import it to OH3.

You need to log in to main UI as admin on the device before opening HabPanel. The gear icon should then be shown.

1 Like

Sure, I did. I am not aware of having created another OH3 user. After migration when starting OH3 the first time I was asked to create a user with password. Now when logging in to OH3 I am using these credentials. And sure, I am starting HABPanel after login to the MainUI from inside the MainUI. But strange: if I start HABPanel from inside the MainUI without logging in as admin HABPanel looks the same. Therefore I am almost sure it’s an authentication issue. But how to fix this ? What could be checked on file level ?

Is it only a problem with habpanel? Are other config actions possible after successful log in? Example: Can you create rules via UI?

Thanks for all your suggestions. So far I did not yet use the new MainUI actively. I was already happy to see my old (OH2) rules, things and items after migration. Now I tried to create a new rule and I was able to save it:

BasicUI is also working. I can see my sitemaps which I setup in OH2. But HABPanel behaves strange.

Strange. Are there some entries in a logfile (e.g. level error or warn)?

Since you have your json file you could technically move it into this folder:

/var/lib/openhab/jsondb/

and name it this:

uicomponents_habpanel_panelconfig.json

As suggested I have copied the json file to the said folder and renamed it accordingly (then stopped OH service and rebooted). And funny - now the HABPanel shows a totally black screen without the
“Sign in with the main UI …” message. But the log shows that HABPanel starts without any error: “[INFO] ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel” - means no json formatting error.

I am in doubt whether it is possible to just rename the json file like suggested. I guess by importing it in the “correct” way some OH3 related (json formatted) information will be added to the json file.
It could be helpful to get a “basic” default/template OH3 “uicomponents_habpanel_panelconfig.json” file to play around with.

Regarding the log files: I do not see any error messages in openhab.log

I also had no edit buttons after migrating from 2.5 to 3. It took me a long time to find the solution: I have to open the habpanel via https!
Using http://servername:8080/habpanel/index.html#/view/… → no edit buttons.
With https://servername:8443/habpanel/index.html#/view/… → everything OK.

Small achievements …

As assumed the format between the earlier from OH2 on Windows exported “habpanel-config.json” and the requested format for OH3 “uicomponents_habpanel_panelconfig.json” is quite different. With a little help from a friend I could adjust a small part of the exported json file to the requested format. After copying this file to /var/lib/openhab/jsondb and restarting OH3 I have now at least a small part of the panel back …

… but still without the possibility to edit anything. Using https with port 8443 did unfortunately not change anything. Still an authentication issue.

Perhaps clearing all the current logged in sessions to OH will trigger Habpanel to see your login?

At the bottom left click on the profile you created and in the main screen hit the minus for all the sessions, I think it was in a mile stone release on a testing VM that the browser kept my login but OH was convinced I was not and I saw issues until I removed all the sessions and signed in fresh.

Good to see you at least got some of the panel working for your system!

Thanks for your help. But no chance … HABPanel is not willing to cooperate …

I am thinking about to forget it and move step by step everything to the new MainUI.

Btw:
I have changed the appearance of the OH3 MainUI to dark mode. When logging out of the MainUI, clearing the browser cache and logging in again the dark mode is gone. I have expected that this setting is kept. If it should be kept it could be another hint that something is not saved correctly. (I tried already: sudo openhab-cli reset-ownership). Maybe I will give it one more try and install a snapshot of OH3.1

Strange - not a solution but an interesting observation: I was trying again to open HABPanel with a different browser (Edge instead of Firefox) and what a surprise - the so long missed “gear” icon in the upper right corner is back:
With Edge:

At the beginning I was using Edge already to open HABPanel but without success - but maybe before running “sudo openhab-cli reset-ownership”.

In case somebody is running into similar problems it might be worth to try a different browser. But not sure whether using Edge instead of Firefox can be considered as a real solution …