Hi,
I have two amcrest cameras I need help with. I am trying to control preset positions of the cameras. From another thread I found how to control them using command line but it doesn’t seem to be working. If I go to either url in my browser I get a pop up to authenticate, I enter my details and the camera moves. These are the commands I’ve tried.
2. When digest authentication fails, response is:
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Digest realm="DH_00408CA5EA04", nonce="000562fdY631973ef04f77a3ede7c1832ff48720ef95ad",
stale=FALSE, qop="auth"
So as far I can tell, the IP camera is refusing my connection. Though the user is administrator and has every access level. Just tested loggin in with the user, and it works fine.
straight into my browser without having to authenticate further and have it move the camera. I just can’t get home assistant to do it. I’ve also tried the browser component in HA but that doesn’t work either.
Hm, this is driving me crazy. I don’t get how it can work in a normal browser, but not in HA.
I know there are a lot of differences between a normal browser, and a cURL call, but we are already getting refused when trying to authenticate.
I think I have found the problem, you might have a bit more knowledge and be able to work out a solution. The newer firmware requires Digest Authentication where as the older firmware used Basic Authentication. I believe that is why your log is showing HTTP/1.1 401 Unauthorized.
Thanks @HooverG, I had been struggling with this for a while and --digest fixed it for me as well. For anyone unfamiliar with the syntax, this is what I’m successfully using for preset positions:
Yes it works for me.
I don’t have access to my config right now but I’ll update this post later today.
At first glance, escape the [ ] curl --digest -u "[username]:[password]" "http://[ipaddress]/cgi-bin/configManager.cgi?action=setConfig&MotionDetect\[0\].Enable=true"
Edit : Also I think I don’t have " surrounding the user:password
Thanks for the response that fixed it. The command I was using was actually a little wrong. I had modified \[0\] to make it work in the browser but it failed in the command line. Working now, cheers
Is there a way to use the amcrest camera component and NOT get a video feed? I already have my feeds from zoneminder. I just need the sensor for motion.