Folder Watcher fails to trigger on creation

Ubuntu 18.04.1
Python 3.6 venv
HomeAssistant 0.86.4

I’ve added a folder watcher to my configuration to track motion in my garage based on recordings from my IP camera.

The IP camera records .MOV files to a SMB share on the HomeAssistant host using a dedicated user account. Files are created in the share path /media/data/nvr/GARAGE/Record_On_Alarm/ under sub folders by day created as required by the camera.

I have added the to the HomeAssistant whitelist (and subsequently rebooted) and configured the folder watcher accordingly in configuration.yaml:

The dedicated user account that HomeAssistant runs under has read access to the directories and files.

folder_watcher:

  • folder: /media/data/nvr/GARAGE/Record_On_Alarm
    patterns:
    • ‘*.mov’

A simple automation manually sets an input_datetime variable when a file creation event is detected.

I have tested this by manually copying a MOV file to one of the sub-directories and everything works as expected. However, none of this works when the camera records a file.

So I’m driven to ask, am I missing something obvious here? Has anyone else encountered this issue?

If I remember right, last time I tested folder watch or inotifywait, that did not work on shared folders. I had my IP cam ftp to a whitelisted folder on HA machine to get folder watch to work.

Well that’s disappointing. Thanks for responding.

There are other ways to notify HA of an event from the IP cam, like MQTT, ssh, etc.
If your IP camera system is accessible, you may be able to set the input_datetime state directly through HA rest api.

Hmm.

It does have “HTTP alarm sending” according to settings, so I might be able to hack something together. It’s fairly basic though.
Thanks for the suggestions, I’ll have to have a think and poke around at the weekend.

To follow up, I was able to get this working on my shared folder (shared from the local filesystem).

The moved event trigger (using a pattern filter of MOV) fires successfully when a camera recording is stored within the monitored folder. I assume that this is down to the camera’s behaviour.