-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Problem with integration with Annake (Hikvision) NVR N46PCK #45
Comments
The integration didn't detect events of your NVR, pls share full logs and we will see why https://github.com/maciej-or/hikvision_next#reporting-issues. |
Integration did not create entities, therefore HA cannot assign incoming events to them. Do you expect the entire log file to be sent or only items related to Hikvision integration. What do you mean by cold work? |
|
I can't find the specific API requests you wrote about in the log. If I ask the NVR "manually", I have answers to these queries as in the attached files. Whereas in home-assistant.log there is Ten błąd pochodzi z niestandardowej integracji. Logger: custom_components.hikvision_next.notifications Cannot process incoming event Entity not found binary_sensor.n46pck1620211230ccrrj28984303wcvu_2_motiondetection Ten błąd pochodzi z niestandardowej integracji. Logger: custom_components.hikvision_next.isapi No device identifier provided: IPCamera 12 |
ok thanks, info you provided is enough, someone submitted similar issue, it's related to non hikvision devices connected to NVR |
Ok, if you need any more data or test the solution, please let me know. |
After upgrading to 1.0.6, I was asked to configure the integration again. I deleted the current integration and redid it again. I received an "Unexpected error" error Unexpected exception 'list' object has no attribute 'get' |
Can you provide output of this endpoint. /ISAPI/System/capabilities |
Hmm I cant see anything obvious. I am assuming that you get this error when you are adding the integration? Can you enable debug logging and provide the log output. |
Yes, I get this error when adding integrations. There is only one error in the log. ERROR (MainThread) [custom_components.hikvision_next.config_flow] Unexpected exception All connection attempts failed |
Logger: custom_components.hikvision_next.config_flow Unexpected exception 'list' object has no attribute 'get' |
I downgraded to 1.0.5. The reintegration was successful. I upgraded to 1.0.6 and got the following error: Config entry 'Network Video Recorder' for hikvision_next integration not ready yet: Unknown error connecting to http://192.168.101.240. Cannot initialize hikvision_next. Error is 'list' object has no attribute 'get'; Retrying in background The HA and NVR are on a subnet with a /23 mask, but I don't think that's a problem. |
Thanks for details, I'm sure it is detecting capabilities issue. There are inconsistencies in responses from different devices. |
@slawekzz pls check if release v1.0.7 solves your problem |
It's still the same error |
Can you enable debug logging and post the log then. I wonder if this is related to the HDD sensor. Add this to your configuration.yaml. reboot HA.
|
That's great. Yes it is an issue with loading the HDD info. Seems the structure of the data is not as expected. Are you able to replace some code in the isapi.py file with the below to see if this resolves it? In isapi.py as line 475 you will see the get_storage_devices function. Can you replace with this, reboot and see if that works. You will have needed to ensure you are on v1.07 first. If this works, I'll ask @maciej-or to update it. async def get_storage_devices(self):
"""Get HDD storage devices."""
storage_list = []
storage_info = (
(await self.isapi.ContentMgmt.Storage(method=GET))
.get("storage", {})
.get("hddList", {})
)
if not isinstance(storage_info, list):
storage_info = [storage_info]
_LOGGER.debug(
"%s/ISAPI/ContentMgmt/Storage %s", self.isapi.host, storage_info
)
for storage in storage_info:
storage = storage.get("hdd")
if not isinstance(storage, list):
storage = [storage]
if storage:
for hdd in storage:
storage_list.append(
HDDInfo(
id=int(hdd.get("id")),
name=hdd.get("hddName"),
type=hdd.get("hddType"),
status=hdd.get("status"),
capacity=int(hdd.get("capacity")),
freespace=int(hdd.get("freeSpace")),
property=hdd.get("property"),
)
)
return storage_list |
Yes, I have version 1.0.7. In the isapi.py file for me it is line 538. I replaced the indicated function with the one you sent and now everything works fine. Thank you. |
Great. @maciej-or can you update this function or do you want me to send a PR? I think this is the cause for a number who are getting the same error in start up. |
I will update, thanks! |
I got an error after upgrading to 1.0.8 Setup failed for custom integration hikvision_next: Unable to import component: cannot import name 'async_get_registry' from 'homeassistant.helpers.entity_registry' (/usr/src/homeassistant/homeassistant/helpers/entity_registry.py) |
In version 1.0.9 it is ok |
Hi
I have configured integration with Annake (Hikvision) NVR N46PCK but there are no entities related to cameras, alarms, motion detection. I am getting the following error in the system log. Entity information arrives but such entities are missing.
Ten błąd pochodzi z niestandardowej integracji.
Logger: custom_components.hikvision_next.notifications
Source: custom_components/hikvision_next/notifications.py:48
Integration: Hikvision NVR / IP Camera (documentation, issues)
First occurred: 12:04:26 (242 occurrences)
Last logged: 12:12:51
Cannot process incoming event Entity not found binary_sensor.n46pck1620211230ccrrj28984303wcvu_2_motiondetection
Cannot process incoming event Entity not found binary_sensor.n46pck1620211230ccrrj28984303wcvu_1_motiondetection
Cannot process incoming event Entity not found binary_sensor.n46pck1620211230ccrrj28984303wcvu_8_videoloss
The text was updated successfully, but these errors were encountered: