milty456
(Rich Smith)
May 28, 2024, 4:40pm
1
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"
rlkoshak
(Rich Koshak)
May 28, 2024, 5:23pm
2
HTTP binding or sendHttpGetRequest
Action from a rule.
milty456
(Rich Smith)
May 28, 2024, 5:29pm
3
rlkoshak
(Rich Koshak)
May 28, 2024, 5:41pm
4
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?
milty456
(Rich Smith)
May 28, 2024, 5:48pm
5
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!
hmerk
(Hans-Jörg Merk)
May 28, 2024, 6:14pm
6
You can also try your command from the shell with curl, to see if it is working outside the browser.
milty456
(Rich Smith)
May 28, 2024, 7:10pm
7
Interesting, even in shell with curl, it runs, nothing happens to the camera setting. No logs in the camera either
hmerk
(Hans-Jörg Merk)
May 28, 2024, 7:14pm
8
I already thought you might come with this answer.
Please try with different method, POST instead of GET
milty456
(Rich Smith)
May 28, 2024, 7:19pm
9
LOL, what am i doing wrong now…as you can tell; i am no engineer…more of a hobbyist
milty456
(Rich Smith)
May 28, 2024, 7:41pm
11
–POST doesnt do anything either
milty456
(Rich Smith)
May 28, 2024, 7:58pm
13
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
matt1
(Skinah)
June 1, 2024, 11:58pm
14
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.