maciej-or / hikvision_next

Home Assistant integration for Hikvision NVRs and IP cameras
102 stars 19 forks source link

ISAPI error Client error '404 Not Found' for url 'http://cams.home//ISAPI/System/deviceInfo' #190

Closed krismarc closed 1 month ago

krismarc commented 1 month ago

Hi guys,

I was able to add my all 6 cameras. However, I get ISAPI error Client error '404 Not Found' for url 'http://cams.home//ISAPI/System/deviceInfo'while trying to add NVR. I'm using my own local dns entries (which worked fine for cams), using IP doesn't help anyhow.

That's my model: DS-7608NXI-I2 / S Firmware Version: V4.62.225 build 240123 Encoding Version: V5.0 build 231130 Hardware Version: 0100250091010000

I'm trying to add it, because I can't detect any motion even if enabled in both camera and nvr settings. Enabling/disabling all detecions via HA works fine - I can see changing configuration in hik's UI. So I'm puzzled what might be wrong.

NVR settings: image D6 cam settings: image

Is there any more detailed hikvision focused guide how this should be configured in order to work with HA?

iVMS drives me crazy, however I can see some motion detections there, The web based UI for devices configuration is either not nice experience. Also detections are present in hikconnect.

Please help, I'm just poor hik end user and I'd like to make some use of line crossing or region entrance detection.

maciej-or commented 1 month ago

hi, I think double / in cams.home//ISAPI/System/deviceInfo is the culprit more over if you have connected all cameras to nvr it is enough to add only nvr in the integration

krismarc commented 1 month ago

Good catch! Actually, you could handle trailing slash. Anyway, without the slash it worked. Yet I don't see any detection in HA :( Any hints how should I Configure NVR and camera connected?

maciej-or commented 1 month ago

Your NVR looks configured properly, pls check Notifications Host settings in device info page in HA, should point to HA instance available from NVR. You could also enable logging and trigger an event and check if notification comes to HA but it not processed for some reason. https://github.com/maciej-or/hikvision_next?tab=readme-ov-file#reporting-issues

krismarc commented 1 month ago

https://pastebin.com/UCHPm3Wz

..so, I've triggered motion and line detection, seems like those are visible in logs, however, I don't see them in sensors history and sensor value remains 'brak'

krismarc commented 1 month ago

Your NVR looks configured properly, pls check Notifications Host settings in device info page in HA, should point to HA instance available from NVR.

do I need to make somehow NVR aware of homeassistant? does it mean kind of configuration for 'survivalence center'? if so.. how to?

krismarc commented 1 month ago

ok, worked! image

so.. the culprit was indeed wrong configuration for notifications host 1) it didn't resolve my dns entry "http://smart.home" and resulted in 'unknown' 2) if port not specified then it defaults to '0'

so I had to set it to http://172.98.98.250:80, while dns entires worked for NVR itself (without the trailing slash)