I’m trying to get an automation to run mediainfo when my media player starts playing. I can get this to work using the Advanced SSH & Web Terminal add-on when I run the commands in sequence, so I think in theory this should work, but it doesn’t seem to be executing outside of that. Here’s how I set up configuration.yaml:
I set log level to debug for shell commands and it seems that the startup shell command works OK (although when I subsequently run it from the services section it gives an error that the resource is busy when trying to mount the folder again - maybe that’s expected?).
The mediainfo shell command returns this error:
stdout: ""
stderr: >-
python3: can't open file '/root/startmpc.py': [Errno 2] No such file or
directory
returncode: 2
OK thanks. I’m running Home Assistant supervised on Debian. Where do I place the bash script so that it can be seen by the shell command? I might be misunderstanding but my impression was that changes to the disk were not persistent, hence why I wanted it to install mediainfo each time on startup.