Folder watcher on other machine

Im using Hassio on a RPI3B+. I want to get a message in my HA front end when a file is copied from /backup to a Windows 10 PC with an USB disk named “G:”. Im planning to use

folder_watcher:
  - folder: <address to the G: USB disk on the Windows 10 machine>

but dont understand how to write the address correctly to the USB disk from inside the config.yaml file as specified above.
I now I need to specify the directory in the Whitelist too.
Anyone?

You have to set up windows to allow that. I suggest googling connecting to a windows network path from linux.

I will try that googling for sure. The PC is already sharing the USB disk so that part is solved. Its the actual format with its eventual http://… and so on I need to understand from someone already doing this. Thanks

It’s going to be covered in that google search. smb://server/path/to/location

1 Like

Yes, thanks! I found
smb://YOURCOMPUTERNAME/Users/YourUserName/ShareFolderName based on your suggestion. Will now be tested. :slight_smile:

I don’t want to rain on your parade, but I tried this a while ago and found that Linux couldn’t watch files on the Windows File System because they work differently. Maybe things have changed, and you get lucky.

However, what I did was mapped a drive from Windows to Linux, and have Windows write to that location rather than it’s local drive. Then watching for changes worked without problems.

According to the documentation of the underlaying Python module of the folder_watcher there is Windows support. There are no details about SMB but it could be that it falls back to periodically comparing snapshots of the directory tree.

@danlun, could you please add this to the documentation at https://www.home-assistant.io/integrations/folder_watcher/ if it’s working as expected? Thanks. It could help other users :wink:

Fabaff, I most certainly will. And thanks all for help! I will test this week. Time is scares :slight_smile:

Hi, I have now some testing, but I don’t get by the configuration check in HA.

In my conf.yaml I write:

homeassistant:
  whitelist_external_dirs:
    - /config
    - /share
    - smb://pc-surf/users/dalu/pictures

but doing that I get this error when doing the normal test:

Configuration not valid, not a directory @ data[‘whitelist_external_dirs’][2]

I start wondering if “white list” can’t handle non-HA directories? Any input from you on this?