openHAB VS Code Extension: no live Item states while hovering over item name!

Using
VS Code version: 1.50.1 on MacOS
openHAB extension version: 0.7.
openHABian: 2.5.10-1 (Master) on RPI4

VS Code settings:

{
“openhab.host”: “192.168.178.42”,
“openhab.port”: 8080,
“openhab.username”: “”,
“openhab.password”: “”,
“workbench.startupEditor”: “newUntitledFile”,
“workbench.iconTheme”: “openhab”,
“openhab.karafCommand”: “ssh openhab@%openhabhost% -p 8101”,
“openhab.lspEnabled”: true,
“openhab.lspPort”: 5007,
“openhab.paperInBrowser”: false,
“openhab.paperPath”: “paperui”,
“openhab.restCompletions”: true,
“openhab.sitemapPreviewUI”: “basicui”,
“openhab.useRestApi”: true,
}

In earlier versions of extension I got the wonderful function that the actual state of an item appeared during hovering over the item name in item-files. But unfortunately this does not work since extensions version 0.7.

I searched also in nearly all threats to get some information about this behaviour, but I didn’t find anything. So I put this into my pocket of my to do’s for any time in the future. But today I found this feature still advertised in the docs on Git Hub, so it should work and I the failure is sitting in front of the keyboard.

Is there anybody to support me for this issue?
Any further details needed?

Thanks in advance.
TomDidi

Mine is working Same Version numbers but on window10

I connect using SSH to openhabian

openHAB 2.5.9-1 (Release Build)

I am editing the texture files for openhabian (things, items, rules etc.) directly in VS Code. Assuming that this will work with ssh? Or do you think that this should separate mentioned in the file settings.json of VS Code (see after editing of my request)?

I run VSCode server on my PI

I only have an SSH connection to PI to edit no samba

My settings are a little more boring

{
  "browser-preview.startUrl": "http://openhabianpi:8080/basicui/app"
}

I am not sure what is wrong with your settings

Hey @TomDidi,

Maybe this post from me can help you?!

It shows how to open the developer tools and check whats going on while hovering an item for example.

When hovering is working correct the console should display something similar to:

The corresponding items did show a valid hover in my case.
Maybe this helps or maybe you can then show us some error messages that show the behavior on your system.

Make sure to clean the log before testing with image because the console is quickly getting messy with many messages.

1 Like

Hi @Confectrician,
your idea is going deep into details, so I made some tests before answering.

My problem is that the hovering (btw. nice expression) is not possible, since beginning of this year (maybe by update to t+extension ver 0.7? So, it worked in the the past. And for me, it was a helpful support for generating reliable rules. But I did not know, that the hovering should be also possible for the items-files.

Based on your comments and hints. I did 2 things:

  1. I reduced the VS Code settings to 2 lines:

“openhab.host”: “192.168.178.42”,
“openhab.port”: 8080,

nothing changed!

  1. Switching to Developer Tools and erased the logs in the console tab. Now I tried to hover again in the rule file, but the same logs appeared as before erasing the logs, please look at attached print screen.
    I hope that you see some details. But for me it does not look fine, so several failure logs, but no logs as expected from your side. So I think that the failure is in my installation, but where?

Do you have any further ideas? Thanks in advance for your support.

Based on your comments and hints. I did 2 things:

I reduced the VS Code settings to 2 lines:
“openhab.host”: “192.168.178.42”,
“openhab.port”: 8080,

nothing changed!

Hm where did i lead you to do this with my explanations?
(Sorry if i did, but i can’t read it somewhere.)
You definetely need to have the rest api enabled (which may be true by default).
The hovering uses the rest api to fetch the item states.
Can you please make sure again that it is enabled in settings?

The log does show no activity of the hover mechanism at all.
But we have to check again, after rest api is definetely turned on from you.
If you have deactivated it now by accident, it won’t even look for items states to hover.

Hi @Confectrician,
sorry for being late and answering your support tonight.

I reduced the settings in settings.json by the support by @denominator, but this did not work and there no change in the behaviour (“no hoovering”). So I switched it back including the call for REST-API. But I am not sure, if this calls are used incorrect manor in settings.json?

{
“openhab.host”: “192.168.178.42”,
“openhab.port”: 8080,
“openhab.useRestApi”: true,
“openhab.lspEnabled”: true,
“openhab.lspPort”: 5007,
“openhab.username”: “”,
“openhab.password”: “”,
“workbench.startupEditor”: “newUntitledFile”,
“workbench.iconTheme”: “openhab”,
“openhab.karafCommand”: “ssh openhab@%openhabhost% -p 8101”,
“openhab.paperInBrowser”: false,
“openhab.paperPath”: “paperui”,
“openhab.restCompletions”: true,
“openhab.sitemapPreviewUI”: “basicui”,
“browser-preview.startUrl”: “http://openhabianpi:8080/basicui/app”,
}

And I also checked the developer tools again, unfortunately there was no hoovering, but a lot of failures. I assume, that the source of my problems is in that part of the log. But I don’t know where! In the past it worked fine with hoovering and I appreciated this function. But sometimes in the past it disappeared.

Do you have any idea?

Can you try only enabling the openhab extension in your workspace.

Done. Only extensions for openHAB and German language are switched on, but no hoovering available. Sorry for the bad news!

I am a bit lost here to be honest.
It looks like the extenseion is activated, but doesnt even try to search for the item to hover its state.

My last anchor would be a complete reinstall of the extension.


Do a “complete” uninstall. (Not over the menu, but like shown in the link above).

I am not sure that it will work, but i have no better options left for now. Sorry.