maciej-or / hikvision_next

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

HA as Alarm Server not receiving Sensor Alert #121

Open slickric01 opened 1 year ago

slickric01 commented 1 year ago

Hi. I followed the checklist. I have motion alerts configured to notify surveillance center. I set the Alarm Server IP in settings when I added the NVR to the integration. Everything looks correct.

image

Based on this, it's trying to use HTTP. My HA uses SSL. If I try to change the HA IP to https, it fails to set up the new device. image image

My NVR is DS-7616NI-K2, Is the SSL the issue? Is there a workaround to add a non-SSL port to HA for API access?

Thanks.

maciej-or commented 1 year ago

Hi, diagnostic should show HTTPS. Please catch logs as described here https://github.com/maciej-or/hikvision_next#reporting-issues then I could help more. You can also use http for alarm server but I don't know what port is opened for that. It depends on your configuration.

slickric01 commented 1 year ago

I enabled logging and prepared to logs. 1 shows what happens after I try to add the NVR with HTTPS in the HA URL

Log with Failed NVR: https://pastebin.com/pYa7tHMH Log with adding NVR with HTTP and no incoming alarms: https://pastebin.com/2RbRHWLQ

Hope this helps. Thanks

maciej-or commented 1 year ago

In the 1st log it looks your NVR does not accept https protocol for alarm server. Anyway I mark this issue as bug for further check. Regarding 2nd log - if your HA works on https at port 8123 you need to open another port for http.

ferdytao commented 1 year ago

Same problem here, I cannot go http as my HA is configured over https, how can I open another http port on HA?

thefunkygibbon commented 10 months ago

i'm getting the same issue, to be honest i'm unsure how things are supposed to work. how does one change the ip address of the "surveillance center" in the hikvision camera settings? I cannot see an option. so i cannot change it to be the HA address.

and yes, https is causing it to fail, even when using an address which is externally resolvable and has a valid ssl certificate on it.

please can someone assist?

maciej-or commented 10 months ago

@thefunkygibbon see #23 for more details