openHAB VS Code Extension 0.3.5

Are you sure you did the correct configuration for both openHAB and VS Code (openHAB Plugin)?

VS Code works reliable to me (and others… :wink: ) since OH2.2 (nightly Version ~ #1183, don’t know the exact number), but I had to do the correct settings in VS Code (for the plugin).

I’m using openHAB2.3 at a vm, VS Code is installed on my Windows10 machine (but worked also under Windows 7) - I’m using a simple samba share to connect to openHAB, either unc or through the bound letter, makes no difference.

For me vs code works not always. After some time I get the error messages, too. There are also log entrys in oh log.

It works and a few minutes later no more validation. After restart of vs code, same as before.

So I think there is no misconfiguration, because at start it works some time.

Hi,

I think the configuration is OK, in VS Code I have configured:
{
“openhab.host”: “192.168.1.102”,
“openhab.port”: 8080,
“openhab.sitemapPreviewUI”: “classicui”,
“openhab.lspEnabled”: true,
}

I am editing a rules file locally on my Win7 PC. openhab is running on my Raspberry Pi 3 (IP as shown above) with the LSP module enabled:

openhab> bundle:list | grep Language
138 â Active â 80 â 0.10.0.b1 â Eclipse SmartHome Language Server

VS Code seems to connect properly to openhab, since I can see error messages in openhab.log.

Is there anything else I should check?

I am getting the same error message

[Error - 16:43:06] Request textDocument/hover failed.
Message: Internal error, please look at the server’s logs.
Code: -32603

I just started with VS code + OpenHAB extention 0.3.5
When I tried to access on my Windows 10 desktop config location:

\OPENHABIANPI\openHAB-share\openhab2-conf

it asked for a password (so far so good!).
To my surprise the required password was the default openHABIAN password “openhabian” and not “MySecretPW” password used.changed in all entries of openhabian-config :face_with_raised_eyebrow:

I am a bit worried! How to change this password also into something less obvious?

Hi Sihui thanks for your reaction
I changed all default passwords in the OpenHabian menu, this is including samba.
I also just now tried with “sudo smbpasswd” and this is for some reason failing in the retype.

[12:05:47] openhabian@openHABianPi:~$ sudo smbpasswd
[sudo] password for openhabian:
New SMB password:
Retype new SMB password:
Failed to find entry for user root.

Just working with cut&paste :wink: any ideas?

You are running your setup with root user instead of openhab user. Very bad idea regarding security.

to change the smb password of user openhabian, you must not use sudo, but only
smbpasswd. This will change the samba password for the user, which did the command.

2 Likes

Hi @Udo_Hartmann, thanks, without the suggested sudo-command I was able to change the samba password and in the windows explorer this new password was required.

BTW still have the impression (but some beers could be confussing me) that inside the OpenHABian config tool a change off all passwords is not updating the samba password.

Hi,

I have installed VS Code on my Windows PC to run OH2. I have the problem that syntax errors are not displayed. Is there any setting options for activating the syntax check?

Thanks!

Hey guys, I´m still struggling with this “[Error - 16:43:06] Request textDocument/hover failed.
Message: Internal error, please look at the server’s logs.
Code: -32603” error.

Still no solution???

the issue is closed and I see no solution for this problem o0

Nope:

mmh, ok, I´m not familiar with Github…

So, there is no solution yet!?!

No

-there is no solution yet-

Seems that no one is famiilar enough with LSP or has the time to spent some effort on ESH side for this at the moment.

When I press Ctrl+[Space] after Itemname. I do net get the postUpdate command.
Is that normal?
I think it should be listet, right?

Using openhab v2.4.0.M3

For me that only works when the item is inside a rule context and the item is defined, like:
grafik

That’s what I expected.
And I can see it now, when I try it again.

So I can not reproduce it.
Maybe everything is fine. :slight_smile: