Basic UI and REST API

  • Platform information:
    • Raspi with openhabian latest stable
    • openHAB version: 3.2.0
      Hi,
      I have a strange behaviour when trying to access my Basic UI sitemap on VSC (preview panel):
      When I make json settings without user name and password the preview works, using URL
      http://192.168.178.70:8080/basicui/app?sitemap=smarthome1.
      But therefore immediately pops up a message: “Error while connecting to openHAB REST API”, error messages are “code 401” and “could not reload items for Thing Explorer”.

On the other hand, when I set my credentials in settings.json the REST API works correctly, therefore the preview panel doesn’t work. VSC tries to use URL:
http://yyyy:xxxxxx@192.168.178.70:8080/basicui/app?sitemap=smarthome1

Here is the settings file. I commented out the two lines for the case described first.

{
   "openhab.connection.authToken": "",
   "openhab.connection.basicAuth.password": "xxxxxx",
    "openhab.connection.basicAuth.username": "yyyy",
   // "openhab.connection.basicAuth.username": "",
   // "openhab.connection.basicAuth.password": "",
    "openhab.connection.host": "192.168.178.70",
    "openhab.connection.port": 8080,
    "openhab.useRestApi": true,
    "security.workspace.trust.untrustedFiles": "open",
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter-notebook"
    },
    "notebook.cellToolbarLocation": {
        "default": "right",
        "jupyter-notebook": "left"
    },
    "files.autoSave": "afterDelay",
    "ev3devBrowser.confirmDelete": false,
    "workbench.editor.untitled.hint": "hidden"
}type or paste code here

On my iOS App the sitemap is shown correctly in both cases…
How can I manage that both preview panel and REST API work?

Interestingly, up to now I couldn’t find any malfunctions, even when REST API isn’t connecting…