Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio code error for "openHAB Language Server": "getaddrinfo ENOTFOUND openhabianpi" #327

Open
ErikDB87 opened this issue Dec 23, 2023 · 0 comments
Labels

Comments

@ErikDB87
Copy link

Expected Behavior

The openHAB Language Server loads.

Current Behavior

I think I read all the documentation I can find, but I'm still encountering an error. Let's start with setting the scene: I've made some changes to settings.json:

{
    "openhab.connection.basicAuth.password": "myAPItoken, which I didn't include here",
    "openhab.connection.host": "192.168.1.9",
    "openhab.connection.port": 8080
}

Setting openhab.connection.host to 192.168.1.9 finally made openHAB extension work. Figuring this out took me some time. :)

But now the openHAB Language Server still trips over openhabianpi, which I don't really understand. Where does it get that from...? This is the error:

Error: getaddrinfo ENOTFOUND openhabianpi
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'openhabianpi'
}

I searched package.json, found here (https://github.com/openhab/openhab-vscode/blob/main/package.json) for openhabianpi, and only found it under openhab.host So I tried adding it to settings.json:

{
    "openhab.connection.basicAuth.password": "myAPItoken, which I didn't include here",
    "openhab.connection.host": "192.168.1.9",
    "openhab.host": "192.168.1.9",
    "openhab.connection.port": 8080
}

But then Visual Studio compains about "deprecated config values":
image

My initial reaction was "so what", but then it turns out, the openHAB Language Server is no longer in the dropdown menu (which I assume means it's not being loaded):
image

The actual problem
In order to escape any 'XY problem', this is what I want: I want to write rules in Visual Studio (on my Windows 11 pc) directly to M:\, which is \\192.168.1.9\openHAB-conf. From my understanding, that's how it should be setup? (192.168.1.9 is a Linux pc, and I installed via apt, so no Openhabian, if that matters.)

But without openHAB Language Server (I at least assume that's the missing piece), there's no visualisation of the code (for example: "rules.JSRULe" is not in colors, as I would expect it):
image

(I also don't understand what's supposed to be wrong with line 1, but that's another matter (or is it because openHAB Language Server isn't loaded?):
image

PS This is a copy of https://community.openhab.org/t/visual-studio-code-error-for-openhab-language-server-getaddrinfo-enotfound-openhabianpi/152191/1, but maybe it's a bug, rather than my configuration not being on point?

Possible Solution

Steps to Reproduce (for Bugs)

Context

Your Environment

  • Version used: Visual Studio Code version 1.85.1
  • Operating System and version (desktop or mobile, Windows 10, Raspbian Jessie, ...): Windows 11 Home 23H2
@ErikDB87 ErikDB87 added the bug label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant