Accessing files from raspberry via Visual code

I am transfering from Openhab2 Windows to raspberrypi.
Frontail Log file is showing that my things are working fine !.
Using nano for copying my rules items and sitemap. Done.
However I cannot set my Visual code to the proper directory on Windows :c:\network
There are no openhab files there. Do not want to edit everything with nano.
I installed the prefered Standard instead of Demo. Is only Demo putting files in the c:\network ??
When typing the ip address from the raspberry in c:\network\192… no files found
Also set the IP address in Visual code but of course he finds nothing because no files are there.
How to access my files on the raspberry ?

thanks

You can access the files on the Raspberry Pi with Samba.

Check the file /etc/samba/smb.conf - you may need to edit it so the shares you need (definitely OPENHAB_CONF) are exposed, as e.g.:

[openHAB-conf]
  comment=openHAB2 site configuration
  path=/etc/openhab2
  writeable=yes
  public=no
  create mask=0664
  directory mask=0775
  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
  delete veto files = yes

From Windows, you can then connect to the Samba shares from the Raspberry Pi by going to \\<hostname or ip address of your Raspberry Pi>\openHAB-conf (replace <hostname or ip address of your Raspberry Pi> with the hostname or the IP address of your Raspberry Pi).

With MS Visual Studio Code, you can then open that mounted share as project folder for remotely editing your files.

Hi Olivier,

Thanks. Please help me out a little more specific. Looking into the smb.conf and seeing

[openHAB-userdata]
; comment=openHAB2 userdata
; path=/var/lib/openhab2
; writeable=yes
; public=no
; create mask=0664
; directory mask=0775
; veto files = /Thumbs.db/.DS_Store/..DS_Store/.apdisk/.*/
; delete veto files = yes

If e.g. I want to have the data in the c:\network folder how I have to change and expose ?
Is my copy paste the correct part to adjust ?

thanks !

This is already exposed (not changed):

[openHAB-conf]
comment=openHAB2 site configuration
path=/etc/openhab2
writeable=yes
public=no
create mask=0664
directory mask=0775
veto files = /Thumbs.db/.DS_Store/..DS_Store/.apdisk/.*/
delete veto files = yes

If you installed using openHABian, then the folders containing the files you need are already shared on the network. Opening \\<ip of RPi> in Windows Explorer will open the shared folders. You should see at least something that has “conf” in the name. That is your /etc/openhab2 folder. That’s the folder you need to open.

C:\anything is only going to be files on the hard drive plugged into your Windows machine.

I typed :
http://192.168.x.xx:8080/start/index/openHAB-conf

getting : (but clicking on the items gives me a 404 not found error.

Welcome to openHAB 2


Home Builder


HABPanel


openHAB Log Viewer


openHABian Help


Basic UI


Paper UI

If you allow your browser to access your location, openHAB will use it for weather and astro information.

Your location:

Getting started? Please refer to the online documentation.

openHAB 2.4.0 Release Build

Rich said the Explorer NOT the InternetExplorer!
The address to type in there is just \\192.168.xx.xx, without the port.

Understand and typed //192.x.xx. without port in normal file explorer :

Hmmm…can’t reach this page

when adding port it links to Windows Edge and to the overall page from Openhabian.
I call it the day. Will try tomorrow again. Any suggestions what I am doing wrong are welcome
thanks

\\192.x.x.x

The direction of the slashes matter.

And again. Not the web browser. Windows Explorer. The program you use to look at your file system.

Has the icon that looks like a manila folder.

Which user and password is supposed to be used through SMB ? The shares are there, but I cant get it to work using the default openhabian/openhabian.
(I´m getting rather annoyed with these linux creditials)

You have to set up the user/pwd first:

Since you are currently transferring OH and you struggle with the credentials I would suggest you use openhabian-config (https://www.openhab.org/docs/installation/openhabian.html#openhabian-configuration-tool) since this takes care about the SMB shares automatically.

I already did that, (I use openhabian). And I set a new password for samba through openhabian-config… Still I can not enter the shares.

Hi Rich,

SOLVED ! I can proceed with setting all up.
Thanks