Execute Bash file to Take a Picture by USB Webcam

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
Rezah
Posts: 10
Joined: Wednesday 31 May 2017 15:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Execute Bash file to Take a Picture by USB Webcam

Post 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
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

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

Post by jannl »

Try using the complete path to uvccapture, may be the script cannot find it

Verstuurd vanaf mijn SM-G930F met Tapatalk

Rezah
Posts: 10
Joined: Wednesday 31 May 2017 15:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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.
Rezah
Posts: 10
Joined: Wednesday 31 May 2017 15:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Rezah »

Anybody can help me?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest