Skip to content
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

Failed to setup with NVR model: DS-7616NI-E2 / 16P #5

Closed
RASBR opened this issue Feb 27, 2023 · 16 comments
Closed

Failed to setup with NVR model: DS-7616NI-E2 / 16P #5

RASBR opened this issue Feb 27, 2023 · 16 comments
Labels
duplicate This issue or pull request already exists help Troubleshooting

Comments

@RASBR
Copy link

RASBR commented Feb 27, 2023

Hi,
Sadly, didn't get it to work. below the error message from HA. any chance this will work with my NVR model?

Thanks :)

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/hikvision_next/isapi.py:303
Integration: Hikvision NVR / IP Camera (documentation)
First occurred: 27 February 2023 at 19:42:11 (7 occurrences)
Last logged: 00:54:11

Error setting up entry RSBR NVR for hikvision_next
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/hikvision_next/init.py", line 56, in async_setup_entry
await isapi.set_alarm_server(
File "/config/custom_components/hikvision_next/isapi.py", line 303, in set_alarm_server
and host["ipAddress"] == address.hostname
KeyError: 'ipAddress'

HIKVision NVR

@RASBR
Copy link
Author

RASBR commented Feb 27, 2023

FYI... Tried installing integration again while UNCHECKING the alarm server creation, and it worked. but without:

  • Alarm server
  • Connected devices

HIKVision NVR1

@RASBR
Copy link
Author

RASBR commented Feb 28, 2023

Hi,
Seems it is not working yet. I don't know what is wrong still looking into it.
I noticed that in some lines the IP address is somehow duplicated (192.168.192.168x.x)

Any advice?

Log: (IP changed)
This error originated from a custom integration.

Logger: custom_components.hikvision_next.isapi
Source: custom_components/hikvision_next/isapi.py:345
Integration: Hikvision NVR / IP Camera (documentation)
First occurred: 01:01:55 (964 occurrences)
Last logged: 17:02:38

Unexpected exception Cannot fetch state for scenechangedetection Client error '403 Forbidden' for url 'http://192.168.x.x/ISAPI/Smart/SceneChangeDetection/1' For more information check: https://httpstatuses.com/403
Unexpected exception Cannot fetch state for regionentrance Client error '403 Forbidden' for url 'http://192.168.192.168.x.x/ISAPI/Smart/regionEntrance/1' For more information check: https://httpstatuses.com/403
Unexpected exception Cannot fetch state for regionexiting Client error '403 Forbidden' for url 'http://192.168.192.168.x.x/ISAPI/Smart/regionExiting/1' For more information check: https://httpstatuses.com/403
Unexpected exception Cannot fetch state for fielddetection Client error '403 Forbidden' for url 'http://192.168.192.168.x.x/ISAPI/Smart/FieldDetection/1' For more information check: https://httpstatuses.com/403
Unexpected exception Cannot fetch state for linedetection Client error '403 Forbidden' for url 'http://192.168.x.x/ISAPI/Smart/LineDetection/1' For more information check: https://httpstatuses.com/403

HIKVision NVR2

@maciej-or
Copy link
Owner

hi, thanks for testing this early version
the first issue has been submitted yesterday #3 and is under development

403 errors can occur after NVR reboot (reload integration is needed then) or user has no permissions, please compare https://github.com/maciej-or/hikvision_next#hikvision-device-setup-checklist

@maciej-or maciej-or added the duplicate This issue or pull request already exists label Feb 28, 2023
@maciej-or
Copy link
Owner

please check dev branch with all fixes
https://github.com/maciej-or/hikvision_next/tree/dev
I recommend remove device from HA, copy new integration version and add device again.

@RASBR
Copy link
Author

RASBR commented Feb 28, 2023

Sadly I am not very experienced in git and code. I think I will wait for the auto update.

Or will a complete removal and fresh download do the same result?

@maciej-or
Copy link
Owner

you can simply download zip by clicking green button Code on branch page https://github.com/maciej-or/hikvision_next/tree/dev

@RASBR
Copy link
Author

RASBR commented Mar 1, 2023

Now I get "Device is already configured" but the integration nor the entities show in HA.
I did the following:

  1. Deleted contents of Folder custom_components/hikvision_next
  2. Downloaded the zipfile, placed its contents in the folder mentioned in step 1
  3. Restarted HA
  4. Added the integration - "Device is already configured"

Thought to share

@maciej-or
Copy link
Owner

You did not remove device as I suggested. So:

  1. go to Settings / Devices & Services
  2. find existing Hikvision NVR / IP Camera integration tile
  3. from three dots menu select Delete
    now you can add NVR again using [+ Add Integration] button
    I keep my fingers crossed

@RASBR
Copy link
Author

RASBR commented Mar 2, 2023

Nothing changed.

I even tried removing the HACS integration from the 'Three dots' and download it again. same message!

@RASBR
Copy link
Author

RASBR commented Mar 6, 2023

Hi,
Were you able to find a fix?

@maciej-or
Copy link
Owner

If removing device didn't help, the only way is modify core.device_registry file.

! PLEASE DO BACKUP before !

Edit config/.storage/core.device_registry and remove all entries associated with hikvision_next identifier.
Restart HA after that and try add NVR.

entries to remove will look like:

  {
    "area_id": null,
    "config_entries": [
      "ed9e2c698a48ff933f1c8d66bfde2825"
    ],
    "configuration_url": null,
    "connections": [],
    "disabled_by": null,
    "entry_type": null,
    "hw_version": null,
    "id": "51ef0f99e8cb345818aad0845a99ee07",
    "identifiers": [
      [
        "hikvision_next",
        "DS-2CD3T20D-I36ee9dc0000000000"
      ]
    ],
    "manufacturer": "Hikvision",
    "model": "DS-2CD3T20D-I3",
    "name_by_user": null,
    "name": "gate",
    "sw_version": "V5.4.23 build 161020",
    "via_device_id": "c457f09b19222a64940d4a0000000000"
  }

@RASBR
Copy link
Author

RASBR commented Mar 7, 2023

Hi,
Firstly allow me to say big thank you!
I guess the removal was successful. I did the following:

  1. Made sure I have a very recent backup (thanks for the reminder)
  2. Uninstalled (removed) integration from HACS.
  3. Edited 'core.device_registry' exactly as you said.
  4. Rebooted HA (I have Intel NUC with HA OS)

HA restarted and seems to be working.

Did you update/fix the integration? Should I try to install again?

@maciej-or
Copy link
Owner

As far fixes are stil on dev branch, you can test it. The release will come soon.

@maciej-or
Copy link
Owner

@RASBR
Copy link
Author

RASBR commented Mar 12, 2023

Thanks for the notice. Did a quick install, on the Integration page I am not seeing the 'Connected Devices'. Will check and read documentation more later tonight.

@maciej-or maciej-or added the help Troubleshooting label Apr 11, 2023
@msp1974
Copy link
Contributor

msp1974 commented May 24, 2023

I wonder if this is also the same issue as #34 as it seems it is also not loading it as a NVR but individual camera. I wonder if this is another Hikvision device_type not reporting NVR but something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists help Troubleshooting
Projects
None yet
Development

No branches or pull requests

3 participants