I am running HA 0.94 in Docker on a Synology. I wish to place files in the www directory so I can view them on the front end, but I am not sure how to configure this directory in whitelist_external_dirs (suspect this is a Docker thing). The following raises an error with the config validator:
homeassistant:
whitelist_external_dirs:
- /tmp # ok no error
- /www # gives error
this works even though I have no actual directory/config, but this is the âmount pathâ Docker is using for my configuration directory. I can now snap images from cameras and server with the www folder using a service call with data:
Whitelist_external_dirs is (as the name suggests) for external directories. Anything within your normal configuration directory does not need to be whitelisted.
Thusly, things in your www directory are already available without this setting.
@anon43302295 I removed the entry from whitelist_external_dirs and the service call no longer saves an image (no error is raised). Can you point to the code where Whitelist_external_dirs is defined? I had a look through the HA repo but cannot see where it is defined
Is the only place it explains the key, which isnât very informative, but yeah I use my www folder for all sorts and I donât use whitelist_external_dirs.
Donât know what more to say there other than have a look at the core code, which hopefully will make more sense to you (as a python man) than it does to me
OK dug some more, www appears to be the only dir in the whitelist:
# Init whitelist external dir
hac.whitelist_external_dirs = {hass.config.path('www')}
if CONF_WHITELIST_EXTERNAL_DIRS in config:
hac.whitelist_external_dirs.update(
set(config[CONF_WHITELIST_EXTERNAL_DIRS]))
So are we thinking that if you add something else to whitelist_external_dirs, then you overwrite the default and have to add www too because the âifâ is executed when you use it, and then it only includes what you give put and not www, whereas if you didnât include it in your configuration the âifâ wouldnât be executed and www would be included as standard?
Not a direct answer to your question, but if you want to access a specific file with a static file name, you can always add it as an ffmpeg camera and see the video through your lovelace. Also note that anything you put in the www folder is accessable through your duckdns ip without logging in.
Another option is to run a simple webserver, configure webDAV and expose the folder.
The camera error has nothing to do with whitelist_external_dirs.
Check your stream_source, it should not be necessary to include the credentials in both the URL and seperately
I think the stream_source works just fine. I am able to stream through the CCTV using VLC media player â open network stream.
I also tried not including the credentials, but then the stream didnât work anymore.
Would you be able to assist me in getting the whitelist thing to work home Assistant Unraid docker docker mount path is /mnt/user/appdata/homedock would like to save images to homedock/snapshots. Can get this to work whitelist_external_dirs but not Whitelist_external_dirs - /snapshots