in domoticz/scripts I have a script that simply pauses our SkyHD box, which currently looks like this:
`#!/bin/bash
sky-remote-cli 10.0.0.5 pause &`
This script file is called 'skyHD_pause'.
Also in the same folder, I have a WAV file that I want to add to the script to play, so I now have the script file looking like this:
`#!/bin/bash
sky-remote-cli 10.0.0.5 pause
play doorbell_11.wav &`
I can already play the audio file directly via SSH by using that command (when I'm in the current script directory). But when Domoticz fires the script, the Sky box pauses, but the audio doesn't play.
Is the location I'm referencing the WAV file okay in the script? The script is called from the 'On' action of a script, and is displayed like this: `script://skyHD_pause`
Any help would be greatly appreciated. PS, no errors appear in the log file, only that the script was executed.
Can someone help me with this simple script?
Moderator: leecollings
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
-
jmleglise
- Posts: 192
- Joined: Monday 12 January 2015 23:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: FRANCE
- Contact:
Re: Can someone help me with this simple script?
hi,
1/ Try to use the full path to the audio file like this :
2/ if this didn't work, try to understand where is your problem with
this command will create a file test.log somewhere ...
3/ why dont' you keep the & at the end of sky-remote-cli 10.0.0.5 pause ?
1/ Try to use the full path to the audio file like this :
Code: Select all
#!/bin/bash
sky-remote-cli 10.0.0.5 pause
play /home/pi/doorbell_11.wav &Code: Select all
#!/bin/bash
sky-remote-cli 10.0.0.5 pause
echo "hello" >test.log &3/ why dont' you keep the & at the end of sky-remote-cli 10.0.0.5 pause ?
My script : https://github.com/jmleglise
RFXTRX433E: Blind Somfy RTS, Portal Somfy Evolvia, chacon IO, Oregon, PIR sensor PT2262
My Last project : Location de vacances a Ouistreham vue mer
KMTronic USB relay
Chinese Z-WAVE: Neo CoolCam
RFXTRX433E: Blind Somfy RTS, Portal Somfy Evolvia, chacon IO, Oregon, PIR sensor PT2262
My Last project : Location de vacances a Ouistreham vue mer
KMTronic USB relay
Chinese Z-WAVE: Neo CoolCam
-
jmleglise
- Posts: 192
- Joined: Monday 12 January 2015 23:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: FRANCE
- Contact:
Re: Can someone help me with this simple script?
And try to see the error :
(not tested. Search "stderr redirect" on the web)
Code: Select all
#!/bin/bash
sky-remote-cli 10.0.0.5 pause
play /home/pi/doorbell_11.wav >> /var/log/play.log 2>&1 &My script : https://github.com/jmleglise
RFXTRX433E: Blind Somfy RTS, Portal Somfy Evolvia, chacon IO, Oregon, PIR sensor PT2262
My Last project : Location de vacances a Ouistreham vue mer
KMTronic USB relay
Chinese Z-WAVE: Neo CoolCam
RFXTRX433E: Blind Somfy RTS, Portal Somfy Evolvia, chacon IO, Oregon, PIR sensor PT2262
My Last project : Location de vacances a Ouistreham vue mer
KMTronic USB relay
Chinese Z-WAVE: Neo CoolCam
Who is online
Users browsing this forum: No registered users and 1 guest