Accessing openhab configuration through VS Code Remote-SSH connection

  • Computer information - running VS Code:
    • Hardware: Chromebook Intel(R) Celeron(R) CPU N3160 @ 1.60GHz AMD64/3.8GB/32GB
  • Platform information:
    • Hardware: Raspberry Pi 4 Model B Rev 1.2
    • openHAB version: 3.0.1
  • Issue of the topic: I am trying to setup my Chromebook to configure my openHAB environment. I have already successfully setup my Win10 desktop by mapping a network drive to the openHAB samba share “\openhabian\openHAB-conf” then accessing that drive directly in VS Code. I first tried to use the built in chromebook network file shares feature and successfully connected to “\openhabian\openHAB-conf”. But I cannot browse to this file share from within VS code. I then setup the Remote-SSH extension within VS Code and have successfully connected to my RPi “openahabian@”, but the file structure is unfamiliar. Looking for the typical folder structure [html, icons, items, persistence, rules, scripts, services, sitemaps, sounds, things, transform]. I need to figure out how to either 1) browse to the chromebook network file share in VS Code or 2) Setup ssh so that I can access the configuration folders in VS Code
  • Configurations:
    *Visual Studio Code version 1.57.1 running on linux virtual machine

Ultimately this is a Chromebook issue. VSCode is installed in the Linux environment. The Linux environment can only see what’s in “Linux Files” under “My Files.” As far as I know it is not able to mount network file shares. So you’ll have to use the Remote-SSH feature in OH.

The folder that is opened is your home folder on the RPi. You need to open /etc/openhab on the RPi. There is nothing to set up. You just need to open a different folder.

I don’t use remote SSH right now so I can’t show you exactly where/how but I’m certain there are tons of tutorials.

Thanks for the quick reply @rlkoshak , I have looked through the folders and can’t find the etc/openhab directory. I have also poked around on the community and can’t find anything meaningful. If anyone else knows where to look from the home folder, please let me know. Thanks all for your help!

From Developing on Remote Machines using SSH and Visual Studio Code

You can then open any folder or workspace on the remote machine using File > Open… or File > Open Workspace… just as you would locally!

So go to File > Open and browse to or type in /etc/openhab

Wow, so obvious. I must have been cross-eyed. Thanks so much for your help!