VSCode extension issues

Gnah.
I had something like this built in already, but it just produces an output when a deprecated setting “is used by an extension part” but not when it is set at all.

That’s not how it was supposed to be, but it seems that it has anded up the wrong way in a refactoring.
I will put out a list of deprecated parameters in the openHAB extension Output.

Should we add a Button to the warning to open the output directly?

Edit:

image
Showcase

I will link the beta version when it is available.

1 Like

Thanks. Hmm, it says

Usage of deprecated config => openhab.consoleCommand <= detected

But isn’t that the correct, new name ? At least the settings page says so.

Do you have configured the consoleCommand on purpose?
How did you configure it, if the answer is yes? (User or workspace setting?)
Can you also check if you still have openhab.karafCommand configured somewhere maybe?

I will try to reproduce the behavior based on your config situation in my debugging environment then.

yes, user settings

It was indeed a small bug in the karaf parameter check.

Continuing here, since the anonuncement is closed and the issue is discussed here with its history:

Did you check you configuration in all possible places?!

User settings
Workspace settings?

Here is a gif of how i would search for the specific setting in the different scopes and reset it to default:
codeExtSearchSetting

Since there are many ways to configure the extension, i can only point to the settings doc article for further investigation.

https://code.visualstudio.com/docs/getstarted/settings

It show possible paths where settings might be stored and hot to fully rest user settings.

Anyway i think it would be good to give an indicator on which scope(s) a deprecated setting is modified in one of the next extension versions.
I will prepare and contribute this extended logging.

I only have user settings and it’s right there. No .vscode directories, I checked.

And did you try to reset the karaf setting too like shown in the gif?

Yes. I’ve now reset the new setting, that now seems to have done the trick !?

Probably some cached data from one of the beta versions.
Config handling in code is pretty confusing sometimes and has caused several problems over the time…

Info only: I meant to try out new extension on OH2-Windows-localhost combination, but never found the needed round-to-it.
Unexpectedly for me, it force-fed me 1.0 anyway, auto updated.

Some whinges about config json as expected, easily corrected as it suggested. I was prepared for that, but it may come as surprise to some users.
No Auth stuff used in OH2 setting.

All working well - thankyou!

Observation - the extension readme displayed in VSC still talks OH 2.x, omits OH3

I had the issue with the extension showing me an error about depreciated configuration too:

However this is not configured anywhere:
image

image

image

I also searched in the settings.json and could not find the setting.
Reloading the window (as shown in the GIF) didn’t help either.


Strangely enough I was able to fix it by just adding the new property to the settings.json:
"openhab.connection.basicAuth.username": "" and the extension did not complain anymore

Same what happened to me. @Confectrician I think that’s still a bug (and unrelated to caching as I had this issue across many restarts)

Maybe you have some settings in:

\openHAB-conf\.vscode\settings.json

on openHab server and not in VSCode itself.

I looked there too but it wasn’t defined there either. What about you @mstormi

same

This thread seems to be a small mystery linked to extension 1.0

Guessing the “fix” would be more to do with LSP and Quantity types.

Seems to be an LSP problem which is another topic than this one.

Topic related:
I can only guess what’s happening and it seems that my guesses were not 100% accurate so far.
So we need to extend the logging, and check what the extension is doing exactly.

If possible you may provide me a settings config, so i can build up your exact settings.
Message or github email adress should be feasable.

Please try the following extension @mstormi and @Felix_Schneider

Download link: openhab-1.0.0-pr-262-10bd8f8.vsix

It will add some more logging to the Developer Tools (because i don’t want to make a messy output. No one reads all of that.)

Can be viewed with the following steps:

Open Developer Tools
image

Go to Console and apply openhab filter:

Look for following log message types and expand the config info with the little arrow:

This will show what vscode knows about the “deprecated” setting and i am able to see where the warning is coming from.
The output may be different from this simple example, depending on the way your configuration is set up.