Bash Script Problem on a Pi Running Domoticz 4.11488
Posted: Friday 29 November 2019 20:57
Hi guys,
I have a simple bash script, in domoticz/scripts/doorbell.sh
It has the rights 777
and if I run sh doorbell.sh from within domoticz/scripts/doorbell.sh my Pi plays the doorbell-1.wav no issues
I have a switch in Domoticz that I can manually turn on and off.(Pic attached)
and refers to the Bash script
When I toggle the switch nothing, no sound nothing.
The log reads as follows
2019-11-29 19:54:32.854 (Esp Wifi 1) Light/Switch (test GPIO 5)
2019-11-29 19:54:32.842 Status: User: Admin initiated a switch command (283/test GPIO 5/On)
2019-11-29 19:54:33.073 Status: Executing script: /home/pi/domoticz/scripts/doorbell.sh
2019-11-29 19:54:34.367 (domoticz) General/kWh (Kitchen Lights kWh Meter)
2019-11-29 19:54:34.405 (domoticz) Usage (Kitchen Lights Watts 1)
2019-11-29 19:54:34.412 (domoticz) General/kWh (Kitchen Lights kWh Meter)
2019-11-29 19:54:34.442 (Esp Wifi 1) Light/Switch (test GPIO 5)
2019-11-29 19:54:34.433 Status: User: Admin initiated a switch command (283/test GPIO 5/Off)
2019-11-29 19:54:35.178 (domoticz) General/kWh (Kitchen Lights kWh Meter)
I have no idea where to go with this as it appears to be working in Domoticz but no sound and def. works from the command line
Any help greatly appreciated
I have a simple bash script, in domoticz/scripts/doorbell.sh
Code: Select all
#!/bin/sh
sudo aplay ~/doorbell-1.wav &
exit 0and if I run sh doorbell.sh from within domoticz/scripts/doorbell.sh my Pi plays the doorbell-1.wav no issues
I have a switch in Domoticz that I can manually turn on and off.(Pic attached)
and refers to the Bash script
When I toggle the switch nothing, no sound nothing.
The log reads as follows
2019-11-29 19:54:32.854 (Esp Wifi 1) Light/Switch (test GPIO 5)
2019-11-29 19:54:32.842 Status: User: Admin initiated a switch command (283/test GPIO 5/On)
2019-11-29 19:54:33.073 Status: Executing script: /home/pi/domoticz/scripts/doorbell.sh
2019-11-29 19:54:34.367 (domoticz) General/kWh (Kitchen Lights kWh Meter)
2019-11-29 19:54:34.405 (domoticz) Usage (Kitchen Lights Watts 1)
2019-11-29 19:54:34.412 (domoticz) General/kWh (Kitchen Lights kWh Meter)
2019-11-29 19:54:34.442 (Esp Wifi 1) Light/Switch (test GPIO 5)
2019-11-29 19:54:34.433 Status: User: Admin initiated a switch command (283/test GPIO 5/Off)
2019-11-29 19:54:35.178 (domoticz) General/kWh (Kitchen Lights kWh Meter)
I have no idea where to go with this as it appears to be working in Domoticz but no sound and def. works from the command line
Any help greatly appreciated