-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Improvements to Dahua/Amcrest module #135
Conversation
ascott18
commented
Dec 30, 2021
- Support digest auth
- Cleanup motion detection request when restarting (don't leave multiple requests running at once)
- Add documentation for Dahua module, noting that it also works for Amcrest.
Thanks for the contribution! Would switching from aiohttp to httpx make this implementation easier since that seems to support both asyncio and digest auth natively? |
It may well do. I'm not a Python dev at all and was just looking for the lowest friction path to get this working, which was borrowing from aio-libs/aiohttp#2213. I did all this work during some time off work I took after Christmas, but I don't forsee having much time to devote to this going forwards. |
In 0c64b09, I switched to an external python module that provides digest auth and async friendly APIs for most functionality which also enabled smart detections on compatible cameras. Do you want to try this version out to see if it does what you need? |
Looks like that's working for me. However, the motion detection stream isn't being cleanup up on teardown, so I'm seeing duplicates after the "pretending to upgrade". For each motion event, I see two |
Nice catch! Hopefully addressed in 7c7d62f. Do you mind giving this a go? |
Thanks, However, one more thing with the switch to the
|
Ok, a few things I found:
|
Closing this out since I think we've finally addressed those issues as well. |