I replaced my 13-year-old computer with a new one.
Both run Linux Mint Una 20.3 and Vscode 1.67.0 with the OH extension 1.0.0
I checked both set-ups, both are the same… however, I get server errors on the machine, like so:
Usage of deprecated config => openhab.username <= detected.
openHAB vscode extension has been activated
Could not reload items for HoverProvider
[Error - 10:13:43 pm] Connection to server is erroring. Shutting down server.
[Error - 10:13:43 pm] Connection to server is erroring. Shutting down server.
---
Error:
Error while connecting to openHAB REST API.
Message:
Error: connect ETIMEDOUT 192.158.1.5:8080
---
The interesting thing is the complaint above about Usage of deprecated config => openhab.username <= detected. which I am obviously not using.
I did not say anything about the OH set-up as I deemed this info redundant given that the old machine works, but not the new one, ruling out the rPi runnning OHv2.5 as being the issue.
I don’t think the deprecation warning has anything to do with the error. OH 2.5 does’t even have any authentication and if it were related to authentication you’d get a different error.
The error is that the connection timed out which usually means that the server did not respond to the connection request. So, since the server is responding from a different machine this is going to be a networking or firewall error or something like that. Can you ping that IP from the new machine? Can you bring up the web interface in a browser?
Thanks…
Yes, can connect to 8080 and get my sitemap (from the VScode mache and all others)…
Also see, can open, mod and save files to the openHAB machine (via VScode).
I did some further investigating (and checking my install docs)…
The old machine is named: maxg-pc-mint
The new machine is named: x570
When I installed the new machine, I could not connect to the openHAB rPi’s SAMBA share, despite using the same command in fstab I had on the old machine.
I eventually installed: sudo apt install -y nfs-kernel-server
… on the openHAB rPi
… then created a share export file: sudo nano /etc/exports
I added access from the network to the share, like so: /etc/openhab2 192.168.1.0/255.255.255.0(rw,sync,no_subtree_check)
On the new PC (x570) I installed: sudo apt install -y nfs-common
Then mounted it manually with: sudo mount -o rw 192.168.1.5:/etc/openhab2 /home/maxg/LinuxMachines/openhab
… this worked
However, despite already having nfs-common on the old machine, it could not connect via NFS in fstab. Reverting back to SAMBA worked: //192.168.1.5/openhab-config /home/maxg/openhab cifs username=maxg,password=abcdefgh,uid=1001,gid=1001
All the while I could not connect from the new machine via SAMBA;
and can not connect via NFS from the old machine. (It does my head in.)
So that is the difference between these two machines.
Can I suggest you get the Remote-SSH extension for vscode? It allows you to connect to the machine with the files you want to modify via ssh, and is actually running a little local proxy tool so it works as if you are local on the remote machine, and you also don’t have to expose a samba or nfs share to access the files over the network. It’s really slick!