Close

execute curl command sighthound windows

Share tips and tricks related to Sighthound Video or your full security setup.

Moderator: Staff

no avatar
WeirdlyChosen
 
Posts: 10
Joined: Wed Apr 05, 2017 12:07 pm

execute curl command sighthound windows

by WeirdlyChosen » Thu May 11, 2017 9:49 am

How to execute curl command in sighthound windows? I have succeed to execute curl using command prompt, but running the same command from sighthound shows an error

User avatar
ryan
 
Posts: 1015
Joined: Wed Aug 25, 2010 2:52 pm
Location: Palo Alto, California

Re: execute curl command sighthound windows

by ryan » Wed May 17, 2017 4:51 pm

Can you share the full command exactly as you've entered it into the app?
Learn more about Sighthound Video in our support pages - Reference Guide | All Articles
Are you a developer? Check out our cloud APIs - Demo | Docs

no avatar
WeirdlyChosen
 
Posts: 10
Joined: Wed Apr 05, 2017 12:07 pm

Re: execute curl command sighthound windows

by WeirdlyChosen » Wed May 17, 2017 10:30 pm

Code: Select all
curl --header "Content-Type: text/plain" --request PUT --data "OFF" http://192.168.1.79:8880/rest/items/MyLight/state


This curl for openHAB is working with command prompt, but not in sighthound.

User avatar
ryan
 
Posts: 1015
Joined: Wed Aug 25, 2010 2:52 pm
Location: Palo Alto, California

Re: execute curl command sighthound windows

by ryan » Mon May 22, 2017 7:58 pm

What curl are you using? Happy to take a look but as curl isn't included with windows I'm not sure what binaries you're running.

Under macOS the following works for me in the rule config:
Code: Select all
curl http://example.com -o /Users/ryan/examplesource


Does that work correctly for you with your curl under windows? To prevent leaks and input and output streams are closed for executed commands which can sometimes be problematic. If supported in your version you may also wish to try with the
Code: Select all
--silent
flag.
Learn more about Sighthound Video in our support pages - Reference Guide | All Articles
Are you a developer? Check out our cloud APIs - Demo | Docs

no avatar
WeirdlyChosen
 
Posts: 10
Joined: Wed Apr 05, 2017 12:07 pm

Re: execute curl command sighthound windows

by WeirdlyChosen » Mon Jul 24, 2017 7:56 am

ryan wrote:What curl are you using? Happy to take a look but as curl isn't included with windows I'm not sure what binaries you're running.

Under macOS the following works for me in the rule config:
Code: Select all
curl http://example.com -o /Users/ryan/examplesource


Does that work correctly for you with your curl under windows? To prevent leaks and input and output streams are closed for executed commands which can sometimes be problematic. If supported in your version you may also wish to try with the
Code: Select all
--silent
flag.

I'm using curl from https://curl.haxx.se/download.html

I succeeded to emulate cURL by putting them in bat files

Here is my content of command entered in sighthound
Code: Select all
cmd.exe /k start C:\Users\Katie\Desktop\lights.bat


Here is my content of bat file
Code: Select all
curl --header "Content-Type: text/plain" --request PUT --data "OFF" http://192.168.1.79:8880/rest/items/MyLight/state
exit

"Exit" is required to close cmd window


Return to General Discussion