script with curl not working annymore

All kinds of 'OS' scripts
Post Reply
tweakertje
Posts: 12
Joined: Saturday 18 March 2017 10:05
Target OS: -
Domoticz version:
Contact:

script with curl not working annymore

Post by tweakertje » Thursday 29 June 2017 23:57

Hi all

I'm using an script to capture an picture from an dvr an sent it with curl to my phone (telegram api)
but for some strange reason ill get
2017-06-29 23:44:43.637 Error: Error executing script command (/usr/local/domoticz/var/scripts/voordeur.sh). returned: 15360

to make it more strange the script works for 3 months an now (maybe afrer an update) the picture is made but its not sended with curl

when I run it is putty it works...

please help...


This is the script (removed my id's)

#!/bin/sh
export DATETIME=`date +%Y-%m-%d-%H%M-%S`
/volume1/@appstore/ffmpeg/bin/ffmpeg -loglevel fatal -i rtsp://user:pass@192.168.1.X:XXX/cam/realmonitor?channel=7@subtype=0 -vframes 1 -r 1 /volume1/somewhere/$DATETIME.jpg
curl -s -X POST "https://api.telegram.org/botmybot:bla bla/sendPhoto" -F chat_id=-mychatid -F caption=Post -F photo=@/volume1/somewhere/$DATETIME.jpg

User avatar
jvdz
Posts: 1423
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Westland/Netherlands
Contact:

Re: script with curl not working annymore

Post by jvdz » Friday 30 June 2017 8:53

What happens when you run the script or Curl statement from the commandprompt ? Does it give any errors?

Jos

User avatar
emme
Posts: 901
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: script with curl not working annymore

Post by emme » Friday 30 June 2017 9:10

uh... did you ugrade the PI with apt?
I had similar problems with photos and it was a user right problem
try to issue a
sudo chmod 777 /Volume1/somewhere/$DATETIME.jpg
and then the curl
The most dangerous phrase in any language is:
"We always done this way"

tweakertje
Posts: 12
Joined: Saturday 18 March 2017 10:05
Target OS: -
Domoticz version:
Contact:

Re: script with curl not working annymore

Post by tweakertje » Friday 30 June 2017 10:24

Hi,
Thank for respond.

when I run it in command prompt the script works.
for the rights I'm tried to send just an text message It just don't work in the script when called in domoticz, when I copy an paste the api link in domoticz it sends the text message.
so I think that curl does not work when called in an script that is called by domotics


by the way the the owner of the saved picture is root so I think that the scrips are running as root.


all of it is running on an syology ds916+ with domoticz v3.8005 from Jadahl

tweakertje
Posts: 12
Joined: Saturday 18 March 2017 10:05
Target OS: -
Domoticz version:
Contact:

Re: script with curl not working annymore

Post by tweakertje » Friday 07 July 2017 14:59

Nobody?????
Bump

veracarpenter
Posts: 1
Joined: Sunday 03 September 2017 21:49
Target OS: Windows
Domoticz version:
Contact:

Re: script with curl not working annymore

Post by veracarpenter » Sunday 03 September 2017 23:54

Have you solved this problem?
Always check all slots and software of your devices!

tweakertje
Posts: 12
Joined: Saturday 18 March 2017 10:05
Target OS: -
Domoticz version:
Contact:

Re: script with curl not working annymore

Post by tweakertje » Monday 04 September 2017 8:13

Yes after an update it worked again

Verstuurd vanaf mijn SM-G930F met Tapatalk


KingOfNuls
Posts: 17
Joined: Monday 09 February 2015 12:24
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: script with curl not working annymore

Post by KingOfNuls » Tuesday 24 October 2017 8:42

Hello,
After what update ? System, domoticz... ?
Regzrds
RPI B - domotiga connected to my visonic alarm
RPI 2 - domoticz connected to 1 wire temp sensors and teleinfo ("power smartmeter")
RPI 3 - domoticz master with mysensors and RFLink gateways

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest