Visual Studio Code Insiders Edition

Not sure if anybody else has already posted this (I did a quick search first) but if you get Visual Studio Code Insiders version, it has an ssh extension that lets you edit files on a Linux machine. You don’t need to install Samba to access your OpenHab files from a Windows machine. I did have to mess with the permissions to make it so I could save changes though. However, it is pretty darn cool. You can install the OpenHab extension on the target machine and get all the benefits. Sadly it wont’ work for Raspberry Pi machines though because VS Code is not supported on ARM32. I run mine in an Ubuntu VM so it works fine for me

1 Like

What do you mean by

The common way would be to install openHAB at a Raspberry, then install VSCode at your Desktop Computer and get access to the Raspberry to edit your configuration.
While using Samba is fine to get access to the files, a scp (through ssh?) would be fine anyway.
I configured my VSCode to use ssh (from git) to get remote access for karaf console.

I did not look into the insider VSCode, but I’m pretty sure VSCode does not need to be installed at the same machine as openHAB to get ssh access to the files.

It’s been reported and it works on the regular version of VSCode now. It has really made things nice when working from my Chromebook. I can’t mount Samba shares into the Linux environment so I used to have to use git push/pull to edit and make changes to the running system. Now with the Remote SSH extension I can get at the files directly.

Actually the problem is with the sshd running on ARM. Raspbian 8+ is supported experimentally. The problem appears to be with library versions.

It is very cool though.

The way this works is VSCode will ssh to the machine and let you browse/open/edit to files on that remote machine as if you were on that machine. So you can connect to your OH machine, open /etc/openhab2 and edit the files. No need for Samba or scp or anything like that.

The one thing that caught be is you must set up a configuration in ~/.ssh/config to connect to your openHAB machine. The docs (link above) has all the details.

I do have an ssh tunnel that I can use to access my server from work, but I’ve not been able to get the ssh to work from Windows so YMMV if you have a Windows desktop running VSCode.

Ah, I see. So there is a special server part for this remote access.

Not special really. It’s standard ssh. But apparently this extension on VSCode uses more than the more typical parts of sshd and consequently runs into errors when connecting to machines on ARM processors older than a certain version of Raspbian.

I didn’t install anything extra on my machine beyond making sure my SSH keys were configured correctly.

But I thought that VCSode itself will install some code on the remote machine!?! Maybe I misunderstood that part.

Anyway, I will definitely give it a try when I find some time :smiley: - me is using a debian x64 vm…

I can confirm that it works using the Linux environment on a Chromebook to run VSCode can successfully use Remote SSH to an Ubuntu Lite 18.4 (I think, maybe 18.10). I’m sure it will work for you. Good luck!

I run OpenHab on an Ubuntu VM so it has been a very nice addition to my tool set. I always thought Samba was a pain to set up anyway. I did it so infrequently that I had to read the docs every time. This extension has saved me hours.

I wonder if the issue with ARM 32 is that it somehow has the concept of installing extensions into the remote environment. I think it may run a process on the remote machine but I’m just theorizing here.