[SOLVED] Error in reaching Openhab Language Server via VS Code

Hi all,

I am new in openHAB and Visual Studio Code. I configured VSC and can access my openHAB-conf folder. It is also possible to save. But there is a problem with Language Server.

Output tab states:
Error: getaddrinfo ENOTFOUND http
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26) {
errno: ‘ENOTFOUND’,
code: ‘ENOTFOUND’,
syscall: ‘getaddrinfo’,
hostname: ‘http’
}

settings.json:
“openhab.host”: “local IP”,
“openhab.port”: 8080,
“openhab.remoteLspEnabled”: true,

What else has to be configured to access Language Server?

Thank you in advance!

is that your content for the openhab.host value or just a placeholder ?

It is only a placeholder for the local IP of my raspi.

Do you connect via samba or ssh?

I am using SSH via Putty. For binding the network folder of openHAB I used win10 ootb functionality. How can I check the connection of the network folder?

I use this to connect not network folder on win10

2 Likes

What is wrong with creating the openhab-conf folder as a network folder in win10 and access it via Visual Studio Code?

Windows has no concept of Linux permissions or ownership.

There is nothing wrong with it at all you can set it up however you want.

The difference for me is I use multiple computers and get the same experience on each of them.

Here is both open at the same time LSP working on both of them but because the lsp is not connected in the correct path through samba/windows share it is different.

I deleted some items to make errors. You can see on the one connected through ssh you can have a console open

You need to setup a ssh key access on the PI but its easy to do. If you can ssh in command CMD prompt without password its much easier.

Here is a session in command prompt Win10 (CMD)

I don`t get the point. I am also able to get ssh in VS Code.


My only problem is to get syntax via LSP because VS Code is stating the lsp is not reachable in output tab.

Found the problem. I have added http://to IP in configuration of host.name. This lead to an error in reaching the LSP.

1 Like