Using network folder/drive


I have a problem with accessing network drives. I have samba setup and working when accessing my config file from my windows computer. However I would like to go the other way around. I want my raspberry pi/home assistant to access my NAS and use files from a folder on the NAS.

I use the following components:

I want both the watcher and the local file to point to a file/folder on the network drive/NAS folder.

This is what I have setup already

  - folder:
      - '*.jpg'

I also tried

  - folder: \\nas\Viktigt\LarmBakup\Snapshot\Terass
      - '*.jpg'

EDIT: I have a synology NAS if that makes any difference

What are the permissions like on the symbology share? What type of share?

Well I’m the admin so I can choose whatever permissions I like. Basically what I’m asking is HOW I can link to a folder on a network drive. No matter what I write as a link it “can’t find it” so I’m thinking about if its the syntax I’m using that’s wrong.

Reading from the PI sd-card itself works just fine, no matter what I put on it, it’s just that I can’t seen to read from a network drive

I have only samba share on my network and no dedicated NAS but I don’t think you can directly access network share file/folder in HA, at least not samba share in HA.
Have not used folder watch yet, if it’s anything like inotifywait, it probably would not work on network share either.

I used to mount my snapshot share folder in HA machine and then process/copy files using a bash script into a /local folder for HA to use. (switched to camera.snapshot now)

It’s quite clumsy, but your jpg is on synology NAS, ftp to HA first may be a possible?

JTPublic may I ask for the bash script to move files from network to HA?

There have been others that had success with accessing NAS folders from PI.

Perhaps they mounted the shared volume on the HA node or (not checked this) depending how HA accesses files and folders some methods allow shares to be specified like smb://server/share/file or cifs://server/share/file

I suspect probably the 1st option though.

When I did this, we did not have folder watcher, etc, components :disappointed:
My old set up was:

  • ipcam saves regular snapshots, i.e. every 5 seconds
  • HA machine had log in script that mounted the share drive from ipcam to a /media folder
  • an automation triggered by motion sensor to copy the latest jpg file from the mounted /media folder to a folder under /local/www for archive and use with notify component.

The scripts used were nothing special, just mounting samba share, and copying file from /media to /local/www.
Like I said, it was quite clumsy but that’s before camera.snapshot and watch(er) components.

You may want to follow up with @wmaker on the use case, that’s still better solution if works.

I should clarify one of my statements…the NFS mount was from the viewpoint of the camera;
In other words it was the camera that was mounting a file system from a directory on my Ubuntu system
the same Ubuntu system that was running HA.

Excuse me guys but I still doesnt understand. Can we access network folders from our home assistant installation(pi running rassbian) or not? It doesn’t matter what components I need to use, or scripts for that matter, I just need it to work somehow.

My experience was I could not access network folders directly with HA, mounted or not.
But a command line or bash script run by HA can access the mounted network file/folder.

Well if your the admin make sure that HA has permissions to access the folder.

From Linux samba shares are often best accessed for me by using smb://

Hi, have the same problem, I can map network drive using terminal but can’t view it in Configurator or find it in installed Plex server. Is there any direct instructions to check permissions?

ferraline I never figured it out, so I decided to use “generic camera” instead.