Items/Things Trees not visible in VS Code EXPLORER side bar with OH extension 0.4.0


(Markus Dieckmann) #1

After upgrading to Openhab 0.4.0 extension in VS Code, the Items and Things trees are no longer visible in VS Codes EXPLORER side bar.

When opening a .rules or .items file, the OPENHAB symbol gets temporarily added to the activity bar, as long as one of the .items, .rules or .sitemap files are open in an editor

When clicking on the OPENHAB symbol on the activity bar the OPENHAB side bar opens and displays the Items and Things as a tree

If I remember the previous version of the OPENHAB VS Code extension correctly, I was able to see Files AND the Items and Things tree together stacked in the EXPLORER side bar.Now they appear to be separated.

So what I’m looking for is that I can stay in the EXPLORER side bar and have files and the trees for Items and Things all visible in one side bar w/o jumping around.

Any help is appreciated to get this fixed.

Openhab version running on Synology DS: 2.2.0.010
VS Code version: 1.27.2 running on PC Win 10, 1809
openhab VS Code extension: 0.4.0

Thanks


(Markus Dieckmann) #2

I guess I found the answer.
This behavior is on purpose and has been introduced with the latest release of OH extension.
see this for reference:

Therefore closing the issue


(Chris) #3

Sorry I didn’t get it. I’m quite a noob to this whole stuff. Is there anything to configure, that the items / things will work properly again? Currently it looks like this in my VS Code Editor

:roll_eyes:

Thanks in advance for your support

Cheers
Chris


(Jerome Luckenbach) #4

Is your rest API setting enabled?
You can do that in the user settings.

Items and thing’s are grabbed through rest api and so the data provider is only registered when this setting is true.


(Chris) #5

Hi Jerome,

yes the rest api is set to true in user settings

Regards
Chris


(Jeff) #6

hello,
i am a newbie trying to learn openhab and watching bkhobby instructional videos on youtube. after installing the extension 0.4.1 and connecting to my openhab 2.4.1 running on synology ds118 with vs code Version 1.31.1 running on a macOS 10.14.3, everything seems to work except i don’t get the sidebar icon or the things and items trees. thanks for any help.


(Jerome Luckenbach) #7

When the extension is installed and activated you should navigate to an items or sitemap file and the extension should activate and show the icon.

It is important that already opened files don’t seem to fire the activation event.
So you should probably open a file directly from the field tree.


(Jeff) #8

update - the sidebar icon started showing up after quitting the program and going back in it just showed up, but now i have the more common problem, which is nothing populating the items and things trees.

my settings are like this…

{
    "openhab.host": "10.0.1.251,",
    "openhab.port": 8080,
    "openhab.useRestApi": true,
    "workbench.iconTheme": "openhab"
}

the icon on the sidebar shows a clock and there is a blue trace on the top animating like it is thinking, but it never fills the trees. this means that is not connecting to the rest api on my server?


(Jerome Luckenbach) #9

Could you remove the , on the openHAB host setting?
Maybe the ip doesn’t get recognized because of it.


(Jeff) #10

that fixed it, thanks!

ugh. i didn’t even notice that i had 2 commas. good catch.


(Jerome Luckenbach) #11

You’re welcome.

I wish it would be that easy all the time. :laughing:
There are some weird bugs and misbehaviors out there.