Page 1 of 1

Execute Bash file to Take a Picture by USB Webcam

Posted: Sunday 20 August 2017 11:17
by Rezah
First off thanks for taking your time to click here.

i have a problem to run my bash file with switch on/off
my bash file is "takePic.sh"
its take a picture from USB webcame and sotre it by test.jpg name.

Code: Select all

#!/bin/bash
uvccapture -S60 -c50 -G40 -B40 -x1280 -y720 -d/dev/video0 -v -otest.jpg
its run & correctly work with this command in console "sh takePic.sh" and take a picture 'test.jpg'
but when in want to run it in domoticz by a Switch , "On Action" = (script:///home/pi/domoticz/scripts/takePic.sh) it doesn't take picture or returned any error.

please help me

Re: Execute Bash file to Take a Picture by USB Webcam

Posted: Sunday 20 August 2017 20:13
by jannl
Try using the complete path to uvccapture, may be the script cannot find it

Verstuurd vanaf mijn SM-G930F met Tapatalk


Re: Execute Bash file to Take a Picture by USB Webcam

Posted: Tuesday 22 August 2017 7:41
by Rezah
tnx dear jannal

i changed my code to "uvccapture -S60 -c50 -G40 -B40 -x1280 -y720 -d/dev/video0 -v -o/home/pi/domoticz/scripts/test.jpg" but its not work :(
returned 256 in domoticz.

Re: Execute Bash file to Take a Picture by USB Webcam

Posted: Friday 25 August 2017 22:43
by Rezah
Anybody can help me?