VS Code Extension With openHAB 3

Thanks! I did as you suggested, this time with the complete token. But still I am seeing:

openHAB vscode extension has been activated
Could not reload items for HoverProvider
---
    Error:
        Error while connecting to openHAB REST API.

    Message:
        Error: connect ECONNREFUSED 192.168.178.100:8081
---

Are you sure about the Port 8081? default it’s 8080

Okay this is strange. I have 8080 set in my config. So why is it still picking up 8081?

Could it have to do with the fact that I am using the SSH support in VSCode? Does the openHAB extension need to be installed locally or on the server? VSCode lets me do both.

Hmm, I found out that there are two config files, one for local and one for remote. I changed both to 8080 but I still get the same error, now:


Error:
        Error while connecting to openHAB REST API.

    Message:
        Error: connect ECONNREFUSED 192.168.178.100:8080

Yes, can be a little bit confusing.
There are several settings.json files, one for the user, one for the opened path, one for the workspace. You have to ensure that the connection is set in only one of these files (or configure it identically in all files…)

Just to double check, did you note Udo’s comment?

The last config you posted (before Udo wrote that) had:

So I just want to make sure you didn’t miss it.

Yes I saw that. It currently looks like this:

{
    "openhab.connection.host": "192.168.178.100",
    "openhab.connection.port": 8080,
    "openhab.connection.authToken": "oh.vscode.7oqK8mCkVxskRwkMEUxgqAiKmDptn21cKU5HvuRoZVDkrTagc5FeicUHbfMkbkM7RTZOlhC5q1vfEgqpt2UJkg",
    "openhab.itemCasing": "camel",
    "openhab.languageserver.remoteEnabled": true,
    "openhab.useRestApi": true,
    "openhab.languageserver.remotePort": 5007,
    "openhab.consoleCommand": "$OPENHAB_RUNTIME/bin/shell",
    "editor.codeActionsOnSave": {},
    "git.autofetch": true,
}

I think I would start fresh with a new VScode instance (is that possible?).
Or VScodium, if that helps.
Or another computer.
So we can make shure there are no old configurations anywhere.