I have spent a few Sunday afternoons trying to play a sound. Everything works fine calling the command from the shell. I have read and tried the suggestions in this topic to no avail
This works:
pi@raspberrypi:~ $ /bin/bash /usr/share/hassio/homeassistant/deurbel/luiddeurbel.sh
This doesn’t:
configuration.yaml:
shell_command:
luid_deurbel: '/bin/bash /usr/share/hassio/homeassistant/deurbel/luiddeurbel.sh'
luiddeurbel.sh:
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/omxplayer
omxplayer '/usr/share/hassio/homeassistant/deurbel/smb_world_clear.wav'
When I go to Configuration > Logs I see:
Error running command: `/bin/bash /usr/share/hassio/homeassistant/deurbel/luiddeurbel.sh`, return code: 127
NoneType: None
Judging from the 127 code, this is probably a permission issue, or it can’t find the files, but I can’t find why. For testing purposes I’ve made both luiddeurbel.sh
and smb_world_clear.wav
0777.
I’m running:
- core-2021.1.5
- supervisor-2021.01.7 (stable)
- Raspbian GNU/Linux 10 (buster)
- Docker 19.03.13
I am running out of ideas where to look. Any suggestions are greatly appreciated!