support wrote:When using curl, pass the --digest flag. IndigoWebServer by default uses digest HTTP authentication (not clear-text basic authentication). You can via a config file force the Indigo Web Server to always use basic authentication, but I only recommend that if you will always be using HTTPS to avoid having the password send as clear text:
viewtopic.php?f=8&t=1590
That did it - THANKS!
I am 99% sure that's why the camera authentication didn't work. While I love the camera, it's primitive in some ways, and doesn't allow for any encryption when using this HTTP trigger method. Going forward, this is a good tip to have on your Rest API examples page.
For anyone following this thread that wants a hack to solve this, I turned on the Apache web server on my Mac that's running Indigo, and made a small PHP script that does the CURL command for me.
- Code: Select all
<?PHP
$var_name = $_GET['name'] ;
$var_value = $_GET['value'] ;
$curl_cli = "curl -X PUT --digest -u username:password -d value=$var_value http://10.0.1.12:8176/variables/$var_name" ;
system($curl_cli) ;
So I have the camera call out it's HTTP trigger to port 80, which runs this script. Then this script calls CURL from the CLI and passes the correct params to Indigo, using the digest method on passwords as indicated by Support.
The result is that my the BL-C131A camera can now sense motion at my front door and change a variable to TRUE in Indigo, indicating so. When that Indigo trigger happens, another Indigo trigger happens that's delayed by 1min which sets the variable back to FALSE. The result is that the camera sees movement, sets the variable to TRUE, and in 1min, the variable is set back to FALSE, assuming the camera doesn't keep setting it back to TRUE due to more movement.
Now I don't need an extra motion sensor at my front door. The camera works with Indigo to turn on the front door light, and records 1m of video, just in case I want to see who was there (Mailman with a package, etc).
Wahoo!