[SOLVED] Windows network share to RPI

Good day,

I’ll keep it as short as possible :stuck_out_tongue:
TL;DR: i want to open my sitemap en item files in windows for easy access via a network share and prefer to edit my files in notepad.

Thought i had the solution but…

Found the [homes] in the /etc/samba/smb.config, put this as “browseable” and created a network share in windows, all working fine.
Doing “ls” via ssh shows the exact same data as i see in windows.(not the one i need though) :slight_smile:
This data is only correct only if i have just connected to my RPI, if i would have changed a directory and try to go back by doing a “cd…”
One picture shows more then thousand words they say… i feel like this so here you go:

Any help would be appreciated.
Thank you.

Use cd – (that’s two minus signs) to return back to ~$ that ='s /home/openhabian/ directory
Use cd … from any where to go back only one directory.

Notice the tilde(~) is used to denote a user’s home directory

/ is the character that separates directories. As the first character in a path, it denotes the root directory.

1 Like

You are sharing the home folder in your samba config:

Follow this: https://www.openhab.org/docs/installation/linux.html#network-sharing

1 Like

Dear H102,

thx for the tip that is actually rly usefull.
did indeed notice the difference therefor the screenshot
I did just not know how to access :slight_smile:

Great, thx!

Dear vzorglub,

Am i missing something but should this give me access to all my rpi files?
For now i am copying my files to this test folder which is accessable.

But still i curious tho.

The samba config is setup to share the contents of /etc/openhab2
This can be changed but for OH you shouldn’t need to.
Not sure what’s in your test file, a script? If so move the test file to /etc/openhab2/scripts

To move the file, from the directory it’s in use > mv test /etc/openhab2/scripts (or whatever path you need)

Here’s a guide to help with linux commands https://community.linuxmint.com/tutorial/view/244 I keep it in my toolbar.:wink:

1 Like

No it will give you access to your openHAB files
It is not recommended to share access to the root directory though it is possible of course

1 Like

Dear H102,

thx for sharing the info, thats a url that goes in to my favorites as well :slight_smile:
i have hardly any linux xp and this will come in handy very much :slight_smile:
“test” is just a folder which i now use to share files with windows, i just copy what i need into that and back after editting.

But seems that when removing the home.sitemap in the orignial folder and then copy my new version out this “test” folder back to the good location that this makes it that my sitemap is not found anymore via Basic UI.
I notice my home.sitemap file is green instead of white now as well via ssh.

so i googled and found this:

  • Green : Executable or recognized data file

shouldnt this be a good thing? :slight_smile:
Though… by default that file was white before i did something wrong

Thank you!

Use> ls -al to show ownership and permissions. I’m testing Piface on the latest snapshot as we chat here’s a pic.

Screenshot%20at%202018-10-13%2010-50-18

Notice the piface is root root. I can use chown to change this or use the openhabian tools by typing> sudo openhabian-config
Then select “Apply Improvements” and “Fix Permissions”

Here is a pic of the same files after using openhabian tools.
Screenshot%20at%202018-10-13%2011-00-56

Notice the owner and group has been changed to openhab opanhabian.

1 Like

Dear H102,

This is indeed a permission issue it seems.
Though fix permissions did work, the item is still green and not accessable via basicUI
I dont think i did something wrong.

thank you so much for all the assistance you already gave!

You have a sitemap file created inside the test folder and your trying to use it with OH?

Another tip is take a look at installing VSCode with the openhab addon. You can change files and write rules easy. Here’s what it looks like

1 Like

Dear H102,

no the file is actually located in the default folder like it was before: /etc/openhab2/sitemaps/
it had indeed the root permission issue which was fixed by using the fix permission interface.

i initially copied my home.items and home.sitemap file to home/openhabian/test
i editted both via windows and my network share.
i then removed the orignials.
i then copied the editted files back to original place /etc/openhab2/items and /etc/openhab2/sitemaps
It was then noticed myfile was green.
and i fixed the permission but the file stays green.

Can you post a picture of > ls -al /etc/openhab2
and ls -al /etc/openhab2/items
and ls -al /etc/openhab2/sitemaps

Sorry for the slow reply, just got the notification.

Give your home.sitemap and home.items files owner read privileges.

From /etc/openhab2/sitemap use> sudo chmod o+r home.sitemap
and
From /etc/openhab2/items use> sudo chmod o+r home.items

1 Like

Hey H102,

first of no need to excuse , i am not in a position to complain, you have been so helpfully already!
this is my new result. (it added an “r” on the file, i assume read)


file is still green and sitemap not yet visible in basicUI

the 2nd screenshot that u see is what happend, not sure tho when this exactly happend.
the 3th screenshot is cause i think there is a chance you might ask for it :stuck_out_tongue:

1 Like

The green color means the file is executable, indicated by the x in rwxrwxr. This shouldn’t make a difference as I’ve tested in the past.

What does your sitemap file look like and do you have any error messages showing in the logs?

1 Like

Please check that BasicUI is still installed by looking in PaperUI>Configuration> Services> UI. This should show all UI’s installed.

i added in the sitemap file only the “EX line” and then labels “lichten” and “rolgordijnen”.
the other labels i have added in the past so they are there for a while

I don’t see anything that looks wrong with your sitemap file. Try commenting out the changes made earlier in the sitemap file using // at the start of Group item=EX label=“Buitenshuis” to see if that makes a difference.

Comment out example for sitemap, notice the // and their location.

Frame label="Garage Door and Motion Detection"
	{
//		Switch item=Proxy_Motion label="Turn OFF to Disable Motion Dection for 1 hour"
		Text item=ESP_Easy_Door label="Garage Door [MAP(esp.map):%s]"
//		Text item=Esp_Easy_Motion label="Garage Movement [%s]" labelcolor=[OFF="green", ON="red"]   valuecolor=[OFF="green", ON="red"]
		Text item=Esp_Garage_Lightlevel label="Garage Light Level [%d %%]"
		Text item=Proxy_Lightlevel label="Garage Light Status [%s]"
	}

Also, please make the changes using nano or vim.