This is really strange.
I can successfully call shell_command from “service” and it works, but when i ran it from automation it fails, that it cannot find folder.
Fail:
DEBUG (MainThread) [homeassistant.components.shell_command] Stderr of command: `curl -T /backup/$(ls -t /backup/ | head -n 1) -u ****:**** ftp://192.168.1.15//mnt/Hassio_Backup/`, return code: 26:
b"curl: Can't open '/backup/New'!\ncurl: try 'curl --help' or 'curl --manual' for more information\ncurl: (26)
I think yes but I not good person to confirm this.
I do know I had similar issue. Basically json wasn’t allowed for me. Ultimately I changed to rest_command and called the created rest service in automations and had no issue.
Hi @asouthernboy,
I am trying to do the same, except that I will use an event from the auto-backup community integration instead of the folder watcher, but I can’t get the shell command running, always getting return code 26.
Had you to set ‘/backup’ in the white list of external directories in the config? I can’t get it working (error in config, not a directory). What am I missing?
Thanks!
That’s what I feared, but hoped you had found a magical solution (or I would have missed a recent development on this issue). I had found related issues in Github, but left open and apparently abandoned. Let’s hope this issue of not exposing this folder will surface again soon.
Thanks for your reply anyway.