maciej-or / hikvision_next

Home Assistant integration for Hikvision NVRs and IP cameras
89 stars 15 forks source link

Unable to set up Integration #181

Open Prythi opened 3 weeks ago

Prythi commented 3 weeks ago

Hi,

Fresh to HA overall and getting stuck on trying to get this integration working... logs aren't giving any information to run with:

Screenshot 2024-06-10 071147

Screenshot 2024-06-10 071622

Screenshot 2024-06-10 071646

HA System: Windows 11 - Hyper-V (HA OS) Hikvision NVR: DS-7616NI-I2/16P

I have followed the installation instructions including the alarm server details.

Really wanting to try and get this integration running.

maciej-or commented 3 weeks ago

Hi, I wonder why there is no exception details. Cloud you please catch all logs as described here https://github.com/maciej-or/hikvision_next?tab=readme-ov-file#reporting-issues

Prythi commented 3 weeks ago

home-assistant_2024-06-10T07-12-30.618Z.log

Hoping that didn't include important info... tried to look over it and didn't see anything vital

Can't get diagnostic logs since the integration itself doesn't start up

Prythi commented 3 weeks ago

I've played around a bit more and tried HA on virtualbox and docker but still get the exact same error and log... which makes me think there might be a firewall issue on my router or even the NVR itself??? but I can't isolate it.

And just to confirm... I can access the NVR through the web ui

maciej-or commented 3 weeks ago

This integration requires the NVR and HA to be on the same network.

Prythi commented 3 weeks ago

As in physically connected to each other? I have them connected by ethernet via router...

HAOS unit ---- router ---- NVR

maciej-or commented 3 weeks ago

ofc via router, your connection seems fine, I meant HA: 192.168.0.x NVR: 192.168.0.y I just wanna to make sure, did you enable integration logs:

logger:
  logs:
    custom_components.hikvision_next: debug

then in the main log you should have entries like: 2024-06-11 14:29:55.289 DEBUG (MainThread) [custom_components.hikvision_next.isapi] --- [GET] ... if I had that I could help more

Prythi commented 3 weeks ago

image

Yeah i've put it into the config yaml.

image

Put in the wrong account details to test. So it definitely gets to the URL... but when trying to log in, it just gets "stuck"???

maciej-or commented 3 weeks ago

Thanks for the efforts but I have no clue what causes that exception. Is you HA up to date? Let's say version from this year?

Prythi commented 3 weeks ago

image

damn... might try an older version of HA - have played through the various settings in my NVR but nothing made a difference

maciej-or commented 3 weeks ago

no, the new one works for me, was afraid you had older

Prythi commented 3 weeks ago

Was there a record of the firmware that was used for the following NVR? Have also tried updating to the latest with no luck

7616NI-I2/16P

Prythi commented 3 weeks ago

Interesting... I can directly access the cameras, through the NVR bypass... i guess I'll just have to set up each camera individually

maciej-or commented 2 weeks ago

It is hard to find the bug if error description is empty. Maybe at least exception type would point the culprit. If you could replace line 82 in hikvision_next/config_flow.py with: errors["base"] = f"Unexpected {type(ex).__name__}: {ex}" restart HA and try setup your NVR then red alert in config window should display exception type

Prythi commented 2 weeks ago

Still doesn't fill...

image

And now there's no error listed in the log file