HTTP API command for my ip camera

Openhab 2.5.11
If i run this command in a browser, i can set my camera setting accordingly.
Is there an easy way to send this through openhab 2.5?

http://user:pw@172.16.1.xxx:#####/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Enable=false"

HTTP binding or sendHttpGetRequest Action from a rule.

Thanks Rick; I tried this and it did not work:
sendHttpGetRequest(“http://USER:PW@172.16.1.111:11111/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Enable=false”)

You are on an ancient version of OH. The docs for 2.5.11 are not even available any longer. So our ability to help is going to be very limited.

But “doesn’t work” encompasses a near infinity of possibilities. Logs? What does the call return? Logs from the camera?

One day I’ll move everything again lol. To your point, yes…understood. Let me turn on some logging and see what transpires. As of now; doesn’t work just means the end result is the settings is not changed. But logging is prob not on.
More to come; appreciate the assist!

You can also try your command from the shell with curl, to see if it is working outside the browser.

Interesting, even in shell with curl, it runs, nothing happens to the camera setting. No logs in the camera either

I already thought you might come with this answer.
Please try with different method, POST instead of GET

LOL, what am i doing wrong now…as you can tell; i am no engineer…more of a hobbyist

Missing hyphens ?

–POST doesnt do anything either

This works

And for executecommand; this works: executeCommandLine(“curl -s --digest -u user:pw -o /tmp/response -w %{http_code}\n -G http://172.12.1.111:11111/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Enable=false”)

Also, for those wondering; this is for an amcrest camera https://s3.amazonaws.com/amcrest-files/AMCREST_CGI_SDK_API.pdf

1 Like

Yes amcrest cameras appear to be rebadged Dahua made cameras and will require digest Auth to be used. The ipcamera binding will work at doing this, I just do not remember which version the binding was ADDED but there should be a v2.5 version which will be very different to the current readme.