HAOS container file systems access

We have Home Assistant Operating System (HAOS) installed on a Raspberry Pi and it all works great: 45 devices, 51 automations, 12 blueprints, etc, started about 18 months ago.

EXCEPT automations calling bash scripts… The scripts work fine via

Also scripts work fine when run on the Terminal plug-in command line.

BUT the same scripts called by “When time” triggers automation encounters “file not found /usr/bin/rsync” or “aplay: device_list:277: no soundcards found”.

I understand that HAOS runs a containerized HA, but I am mystified that the interactive interface is so different from the automated interface. Surely I am missing an important detail and [troll bait warning] someone can show me the difference so that I can get our scripts working.

Any nudge would be greatly appreciated!

You need to put the script somewhere that is accessible to the homeassistant container - for example in the “/config” folder.

Thank you, but the script location is not the problem. In both my examples the scripts are /share/mybin/{backup2share,playtester} and HA is able to invoke them via “when”. The invocation is able to write trace files such as /share/backups/last.txt and /share/tmp/playtester.out

PS, all the same file system in this vanilla deployment:
/config df -m /config /share
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mmcblk0p8 119594 9459 105237 8% /addon_configs
/dev/mmcblk0p8 119594 9459 105237 8% /addon_configs

The Terminal addon one is an addon like any other, i.e. a docker container that basically has nothing in common with HAOS itself besides a couple of shared folders.

You cannot make any assumptions based on the fact that a script will work in the addon.

The only way to properly test your scripts is to ssh to HAOS itself, via: