Items variables not showing in sitemap


(Chris Luck) #1

Hi,
I am using visual studio code and all seems ok, except that new item names are not popping up in sitemap when I start typing.i.e. no autocomplete for items, but all other autocomplete and older items is working.
It makes VSCode useless fo me, unless the items can be referenced in sitemap. Any ideas


(SiHui) #2

You need to save your items file first before you can use them for autocompletion.


(Harry) #3

What version of VSCode and openHAB-extension do you use?
Have you saved the items-file and reopened the sitemap.file?


(Chris Luck) #4

Hi,
Yes I am saving the files, but still not working.
vscode on mac = Version 1.23.1 (1.23.1),
openHAB extension version 0.3.3


(Harry) #5

openHAB-extension 0.3.5 is actual https://marketplace.visualstudio.com/items?itemName=openhab.openhab
but there is not yet a check in sidemap if a item is valid


(Chris Luck) #6

It seems I need to reboot the raspberrypi for teh items to become available. Is this correct?


(SiHui) #7

No, it’s not.
I would try to edit one of your items file locally through nano or vim or whatever editor your are using.
If you don’t see a message in your openhab.log like

Refreshing model 'youritemsfile.items'

you have a problem with your openHAB setup.
If that is working fine you should check your VSC setup, maybe reinstall the openHAB extension.
Also check your samba setup for proper function.


(Chris Luck) #8

It is noew fixed. Im not sure if i did anything special, but with updates, upgrades and reinstalls, over time the problem went away.


(Christoph Nagel) #9

I have a similar problem: Tapping on the sitemap button “openHAB” leads to this error message which says that “… there is no data provider installed which may deliver any view data.”

Any hints? Thanks in advance!


(Jerome Luckenbach) #10

Could you please check your settings for the rest api?
“No Data provider” is usually shown when rest api connection is disabled.
The extension needs an active rest api connection to your openHAB system to provide the items and things.


(Christoph Nagel) #11

Hi! Thank you!
Are this settings I have to define in VSC only or are there any settings to be made in samba or raspbian/ openhabian (I use a Raspi 3B) as well?
Regards!


(Jerome Luckenbach) #12

Hi,

I am talking about the openHAB vscode extension settings only.
Usually there should be nothing to do on openhabian side.