-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snapshot does not work on Amcrest firmware V2.400.AC02.15.R.20170731 #102
Comments
Hello, I use a dahua nvr, and where an http call to snapshot.cgi used to work (yes with digest authentication) on an older nvr, I have now replaced it, and the api seems quite different. There was also a call for ConfigManager.cgi&getConfig?name=ChannelTitle that also now fails....but I found in fiddler that there is an RPC2 call that is made now with json that replicates this function, eg:
Hoping that someone might be interested in working on this, as is may be similar for the snapshot call, that may have moved to the rpc2 method also..... |
Hello, Issue #86 Here is a small snippet using the latest code in master.
So in summary: worked
failed
My problem is even if I overwrite the code use Digest, I get the 500 error. 48 auth = HTTPDigestAuth(self._user, self._password)
49 ret = requests.get(
50
'http://amcrestcam3.tatu.home:80/cgi-bin/snapshot.cgi?channel=0',
51 auth=auth,
52 stream=True)
53 import rpdb; rpdb.set_trace()
! ~/d/python-amcrest * src telnet localhost 4444
Sun 10 Mar 2019 11:04:55 PM EDT
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
> /home/mdemello/devel/python-amcrest/src/amcrest/snapshot.py(59)snapshot()
-> if path_file:
(Pdb) l
54 #ret = self.command(
55 # "snapshot.cgi?channel={0}".format(channel),
56 # timeout_cmd=timeout
57 #)
58
59 -> if path_file:
60 with open(path_file, 'wb') as out_file:
61 shutil.copyfileobj(ret.raw, out_file)
62
63 return ret.raw
[EOF]
(Pdb) ret
<Response [500]> @pnbruckner , can you try that on yours? |
@pnbruckner using the latest merged #108 still the same problem on my camera. Maybe is something with my camera.
|
Using the latest code on master, I could grab snapshots (channels 0 & 1) from both of my cameras. Here is what I did:
|
Of course, if I shut the stream off, then:
|
The 1.5.1 release just made should fix these incorrect reports of error 401. However, if the snapshot command doesn't work, there will just be a more reasonable error, which is a connection error. There are two reasons I know of why a snapshot command will fail. The first is trying to issue two snapshot commands simultaneously, e.g., from two different hosts. The one that starts first should succeed, but the second may result in a "connection closed with no response" type error. The other is if the snapshot quality is too high. This I believe can cause an error 500. Since this issue is fairly old, and there have been several updates to this package, as well as the HA amcrest component, I'm going to close this issue. Feel free to reopen if necessary. BTW, I'm also working on a new HA amcrest component release that should significantly improve its overall error handling, especially if/when the camera goes "off line." |
Fails on:
2.400.AC01.15.R
2.400.AC02.15.R.20170731
See: #86
The text was updated successfully, but these errors were encountered: