VS Code not giving the status of Items when hovered over

I’m sure in the past when I was debugging rules etc, that when I hovered on an Item or Group in VS Code that it would show up the state of that item/group.

Its not doing that anymore and I’m not sure what setting or whatever needs to change, I dont remember the last time it worked but I get the feeling it was before we had to move to the latest settings for openhab.

I’m still on OH2 branch (latest) but assume its a VS Code thing not OH version thing?

I use VSCode and connect through SSH and it is working for me

The latest version of the extension (from April 2021) changed the configuration.

So maybe you need to setup the extension settings again für the new syntax.

This is working for me (OH 2.5):

  "openhab.connection.host": "192.168.x.x",
  "openhab.connection.port": 8080,
  "openhab.consoleCommand": "ssh openhab@%openhabhost% -p 8101",

openhab.consoleCommand is not needed to get item-states, I think.

Thanks for the replies, my setting.json says this:

    "openhab.connection.host": "",
    "openhab.connection.port": 8080,
    "openhab.connection.authToken": "",
    "openhab.useRestApi": false,
    "openhab.connection.basicAuth.username": "",
    "openhab.connection.basicAuth.password": ""

My Karaf command is the same as yours
Does the lack of auth token have any impact?
What about the “Use Rest API” mine is unticked

I dont’t know.

Do you get any errors in the output terminal?

Like this:

Maybe @Confectrician help.

Nope no errors, turned out it was that Use REST Api check box that needed checking and then restart VSC. Then it works again.

Thanks for trying to help. Appreciated

1 Like