-
Notifications
You must be signed in to change notification settings - Fork 89
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
NVR integration - Failed to sync device state; 401 Unauthorized errors. #101
Comments
This is a weird one. Not sure what I can do to help here. I assume you are still facing this issue? |
@rroller Yeah I am.. My guess is authentication credentials isn't being presented properly? Testing my NVR with postman. Enable "Basic Auth" with the same username and password, works with the following response. table.General.MachineName=NVR UPDATE So, my NVR doesnt support Digest Auth? only Basic Auth? Unless i'm doing something wrong in Postman when enabling Digest Auth? |
|
|
Without passing authentication user / pass.. It is clear my NVR is wanting Basic Auth. I wonder if that is a setting i can change? Strange because I am running current v4 firmware build 27th Aug 2021.
|
I was having similar issues connecting to my Dahua NVR via curl and the Dahua custom integration. Tracked the problem down to having https/ssl enabled and not having the cert locally installed. Disabled SSL and all is well. Since I have all cameras and NVR blocked to the Internet, local http should be fine. |
@GaryOkie, I did try enabling and disabling https based on the original issue I quoted. (You will see my logs above are straight http / port 80.) For clarification, I've enabled HTTPS, and this is the result of the curl test. It still shows WWW-Authenticate as Basic
|
So long story short, it seems there needs to be a option to be able to select Basic authentication, as well as the default Digest Authentication? Can we make this happen please? :) |
My Dahua NVR states that an RTSP feed is available as follows rtsp://:@:/cam/realmonitor?channel=1&subtype=0 The integration appears to not understand this. |
Hello I end up into similar situation as DanielNagy and thetravellor, when I tried to access Dahua DHI-NVR4104-P-4KS2 unit with the latest Dahua Integration 0.9.39. |
I have since found that the integration only works with the 4.0 dahua UI, you need to update the firmware your model. https://www.dahuasecurity.com/support/downloadCenter/firmware?child=171 If no firmware, you are out of luck. |
@thetravellor I have a NVR5216-16P-4KS2, and I'm running the following System Version | V4.002.0000000.2.R, Build Date: 20-01-2022 And the Security -> System Service -> Basic Services -> Private Protocol Authentication mode is set to "Security Mode (recommended)" which according to the manual is Digest mode. I have tried changing this setting, rebooting, changing back, rebooting.. to no avail. |
@thetravellor Yeh, i already have that disabled, as per your screenshot. |
any update guys? this happen only on my NVR, DVR work properly test:
output:
|
Attempting to add my NVR5xxx-4KS2 series NVR, but fails with 401 Unauthorized errors.
Looked in issue #9 but it doesn't appear anyone has had this issue.
Version of the custom_component
latest 0.9.24
Describe the bug
Added the Integration with the username/password/ ip address, and it Successfully creates the integeration.
However, the Integration becomes "red", with "Retrying Setup". Checking the logs shows "integration not ready yet; Retrying in background", and "Failed to sync device state".
In log viewer, it shows that all the NVR's endpoints are failing with a 401, Unauthorized. If I manually browse to those cgi-bin based uri's, chrome prompts with username and password, and using the same credentials, successfully show valid responses.
Debug log
The text was updated successfully, but these errors were encountered: