Error while connecting to openHAB REST API ENOTFOUND 192.168.0.7

This is all part of using VS code.

I’m also getting Connection to Server is erroring. Shutting down server.
Not seeing things at the bottom?
I’ve tried all the things like the hostname changes, etc.
openhab.host": “192.168.0.1”,

"openhab.port": "8080",

"openhab.useRestApi": true,

"workbench.iconTheme": "openhab",

"openhab.username": "openhabian",

"openhab.password": "openhabian",

"window.zoomLevel": 0,

"openhab.remoteLspEnabled": true,

"openhab.sitemapPreviewUI": "basicui"

Can’t seem to get rid of error? I do see my OH directory’s, but VS does not populate items, things. I can ping both the ip and openhab from a terminal with success? Maybe I just don’t understand the API setup???
I am running the demo.

Sorry learning!!!

This should have been fixed with openHAB VSC plugin 0.7.0.
Which version are you running?

That is the one I’m running. I’m still unclear of how the API interacts with OH. I do see a REST in paper ui, but have no idea how or what it does. One thing that I did notice was I putty into the raspberry using a target of openhab. not openhabian as is often noted in instruction. The config utility show’s that is the name so that is why it works. Maybe I should try openhab as the targer in the VSC setting for openhab? Have not tried that only the IP and openhabian

Is there something special I need to do to access the ip. From the terminal window it pings, but that is not the error. It’s the REST API that’s erroring

getaddrinfo says ENOTFOUND 192.168.0.07

Did you mean 192.168.0.7 ? You have an extra zero :wink:

not really an issue I think? no matter what I put in the openhab.host the error returns a .07.

It is technically not valid and whether it is a problem would depend on the client network stack.

I’m sort of surprised at that, I’m no stack expert but I’d assume that parsing the IP address would take “.” as a terminal character and evaluate 07 or 7 the same. I’m beginning to think it’s a certificate issue?

Can you ping 192.168.0.7 from OH? If not, there is an underlying network issue. I am surprised your OH server is at 192.168.0.1. Many people use that address for their Internet router.

Sorry, typo on initial inquiry. it is 192.168.0.07. I can ping that address from inside VSC I can also ping openhab (my named instance) and can putty into it. What I found now is that no matter what I out in openhab.host it always errors as 192.168.0.07 so I’m tracking down where that is coming from?

Nope.
The fix was on openHAB core side for the remote Language server.

Which version of openHAB are you running @cdstaley?

1 Like

2.5.0

You might be on to something. I downloaded the Openhabian v1.4.1 not really reading the whole page just seeing the RPi3B+ which is what I have. I guess the openHABian V1.5 will also support i.e. backward compatible with the RPi3+. Didn’t say that so I didn’t want to assume.

Not true, on further examination, I got the 1.5

OK, for reasons I can’t explain (possible VSC cache holds values) I got it to work. No definitive reason why it started working, but I must have tried everything at least a dozen times. It’s possible that I didn’t see the error go away because it was cache the results. I started killing VSC and then starting it again after each try. “clearly there must be a better method?”. Amway, the errors went away, the items and things are visible? Thanks everyone for the help!

I have thought about cached values too already.

My subjective impression is, that fixed bugs still appear some while after new releases. I haven’t found a nice solution yet.

I managed development projects from the code level to the VP level my whole career. I designed a configuration management system with 4 tools developers that later became the backbone of rational’s SCM and later bought by IBM. My employee left and went to Rational to build the system. Most are pretty lousy. I don’t really know how they manage it here, but I think I saw the “founder” on a video how is still attempting to manage all the changes. Because most branch effort is a temporal instantiation the merger is often done by others with no understanding of the logical and physical dependencies. Ergo, bugs!
cds