URL for Setting Change
Can I plug a URL direct to CronniX rather than using an AppleScript? I've not discovered the correct URL yet. I have this but not sure what goes in between I've tried ?, &, +, ++ but no go.
http://user:pass@127.0.0.1:8000/++camerasetup cameraNum=0&mdCheck=0&action=save
Thanks for your assistance.
http://user:pass@127.0.0.1:8000/++camerasetup cameraNum=0&mdCheck=0&action=save
Thanks for your assistance.
Comments
-
I should clarify direct in CronniX with a curl command.
-
The URL would be:
http://user:pass@127.0.0.1:8000/++camerasetup?cameraNum=0&mdCheck=0&action=save
You can use curl to issue the GET HTTP request directly in the cron job, so the cron command would simply be:
curl http://user:pass@127........
Hope this helps. -
Thanks Ben, that's what I thought. I had tried it, and tried it again, I get:
404 File not found
and the action does not happen, but I can login and change it manually so the authorization should be good. -
Sorry I was a bit wrong in my curl command. The HTTP request is actually a POST request, not a GET request, so it has to be issued by curl like this:
curl -d 'cameraNum=0&mdCheck=0&action=save' http://user:pass@127.0.0.1:8000/++camerasetup
Does that work? I've just tested it here and it works for me (copy and paste it into Terminal to test). -
Yes indeed that worked great. Thank you.
-
One more thing...how would I curl a ptz command?
I tried:
curl -d 'cameraNum=2&ptz=3&action=save' http://user:pass@127.0.0.1:8000/++camerasetup -
Forget that. It occurred to me that I should RTFM, and what do you know, I found all I need.
