Torbenan
(Torben Andersen)
June 14, 2018, 9:29pm
1
I’m trying to save a snapshot from a camera to HA. In config.yaml, I have this
homeassistant:
whitelist_external_dirs:
- ‘/config/tmp’
- ‘/tmp’
I’ve created a folder \hassio\config\tmp with samba, but I get this:
Can’t write ‘/config/tmp/dafang1_20180614-232044.jpg’, no access to path!
Any idea what I’m missing is appreciated
I’m not sure, but 2 observations…
1 - it’s whitelist external directories, you shouldn’t need to list any directories from inside your configuration directory.
2 - you seem to be confusing Windows and Linux paths somewhere along the line, / for Linux, \ for windows. It may just be that you’re writing it that way because that’s how it looks in your Samba client, but it’s actually the right way round on the device at which point no issue, but if it’s like that on your device then it won’t be in the right place.
Torbenan
(Torben Andersen)
June 14, 2018, 9:56pm
3
Thanks for clearifying. So I guess my question wasn’t the right one. I found a script with this line:
filename: ‘/config/tmp/dafang1_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg’
Where is this script trying to save the file? How can I direct the file to the SD card of my RPI (running Hassio)
I’m not sure with hassio tbh, but at a guess it’s a relative path, so the line in the script should be
filename: 'tmp/dafang1_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg'
Or possibly it still needs config/ at the front, but without the leading /
Or, possibly, it needs to be /hassio/config/tmp/ etc?
Torbenan
(Torben Andersen)
June 14, 2018, 10:11pm
6
No success. I guess I have to investigate where Hassio is storing files by default. But thanks a lot for being so helpful
Yeah, you’ll need to know the file/directory structure (tree) on the device, and how hassio sits within it.
I’m sure someone on here will know and point you in the right direction soon
keithh666
(Keith Hull)
June 15, 2018, 8:08pm
8
try creating a tmp dir under config and it should work.