Hikvision Doorbell / Videointercom integration

hi, well at first sight i dont see any error at all? all messages are received? are you sure the entities are not updating? The door relay switch is only on for 2 seconds, maybe thats why you dont see it :slight_smile:

Hi, yeah, thats why I am confused too :smiley:. I do not see any update on the sensor in the history and I can also not activate the door relay 1/2 in HA - all greyed out.

are you sure the add-on is still started? Can you also test with mqtt explorer to see something? Cause i dont think its an addon issue here?

Haha, I just needed to restart the hikvision-doorbell container. Works nice :smiley: .

Just one thing was a bit strange, I have a doorbell for 2 parties, so there are 2 door-relay buttons. The first one is not set up and it will not ring anywhere. The second one is set up and working like expected.

I expected that the door-relay 2 button is therefor the one I must activate in HA to open the door, but there happens nothing. But if i activate it, for a fraction of second the door-relay 1 is activated and then deactivated - without opening the door though. That is also reflected in the MQTT messages i see.
For door-relay 1, I press it, the door is opened and everything works.

In MQTT I see that the HA door-relay 1 button activates the “Door-2-relay”, so there seems to be an switch in IDs. But that is nothing really important - I will just rename them.

Here are the events from Hikvision for this unknown door relay button press:

2023-07-28 10:04:56.999 | DEBUG    | mqtt:door_switch_callback:149 - Received command: ON, door_id: 1, doorbell: outdoor
[2023-07-28 10:04:56.999][DBG] Remote control dwCommToDVR[0x126009] dwDVRReturn[0]  dwoutBufSize[172]
[2023-07-28 10:04:57.001][INF] Private connect 192.168.x.x:8000 sock=160 this=0x95d29968 cmd=0x126009 port=55204
2023-07-28 10:04:57.012 | INFO     | doorbell:unlock_door:116 -  Door 2 unlocked by SDK
2023-07-28 10:04:57.328 | DEBUG    | event:_handle_callback:192 - Callback invoked from SDK
2023-07-28 10:04:57.328 | DEBUG    | event:_invoke_handlers:166 - Invoking 2 handlers
2023-07-28 10:04:57.329 | WARNING  | mqtt:video_intercom_event:197 - Received unknown lockID: 2
2023-07-28 10:04:57.329 | DEBUG    | mqtt:video_intercom_event:198 - Changing switches back to OFF position
[2023-07-28 10:04:57.327][INF] Alarm[0] IP[192.168.x.x] data_len[36246] alarm_len[36246] status[431]
[2023-07-28 10:04:57.329][INF] [0][COM_CoreDevCfg_GetDeviceAbility] AbilityType 0x14, InbufLen=[0], OutbufLen[4096]
[2023-07-28 10:04:57.330][INF] Private connect 192.168.x.x:8000 sock=160 this=0x95d29968 cmd=0x11000 port=55208
2023-07-28 10:04:57.341 | INFO     | event:video_intercom_event:98 - Video intercom event from outdoor

Maybe this is just some beautifying there but wanted to post it anyway.

Thank you again for your work on this addon :slight_smile:

My apologies. I have mistaken early video for after picking up the call. I was only able to ring all the phones and get video and audio after pickup. I’ll have to research about early media again and get back to you if it works. Unfortunately, linphone and flexisip are blocked in our country. So, ill have to setup a server to test the push notifications. Thanks for your feedback and support.

1 Like

yeah correct, internally the door id’s are 0 and 1 , but for end users it will be visible as 1 and 2

Please tell me the issue with the additions of the zones has not been resolved. Zones, as before, only one is added. Last.

its coming in next release

1 Like

Hi
Is any chance to implement configuration no as yaml editor (plain text) but as GUI… and hide pass which we input in this config. It should be looks as example as in ebusd addon menu config:

feel free to submit a PR :slight_smile:
For me now this is less important, still testing

next version will be like below, as you can see both ar panic alars, but visible seperately :

image

2023-07-28 15:29:25.700 | INFO     | event:video_intercom_alarm:109 - Video intercom alarm from DS-KH9510-TEST
2023-07-28 15:29:25.700 | INFO     | mqtt:video_intercom_alarm:284 - Zone alarm detected on doorbell DS-KH9510-TEST, zone type: Panic button, zone number: 7 
2023-07-28 15:29:29.073 | INFO     | event:video_intercom_alarm:109 - Video intercom alarm from DS-KH9510-TEST
2023-07-28 15:29:29.074 | INFO     | mqtt:video_intercom_alarm:284 - Zone alarm detected on doorbell DS-KH9510-TEST, zone type: Panic button, zone number: 8

That should be ok, right?

I own a ds-kv8102-im. No indoor station. I am trying to integrate it with HA. The functionality needed is the press button and being able to accept or reject the call. None of these work. I get no event for the button press. I get “unsupported action” for the rest. Only the door release/unlock action works.

The device runs the latest firmware. I have no idea why it does not work. I would expect the SDK to be what IVMS also uses. IVMS somehow manages to get notified of the button press. So how are they doing it? I am a java and c# developer so maybe I can help. Do you think that it can be done and you have missed something with the SDK integration? Or hikvision does not provide the full functionality through the SDK?

I also captured some SIP/XML packets from the doorbell to a configured internal address of mine. I found a similar support topic that you had created about this. Did you find out anything regarding this issue? Do you think that the button press event is actually sent using SIP?

Thanks for your work. I hope can help. Great work so far.

Hi , that’s is indeed an older device, it doesn’t indeed support all SDK function, there is also no Isapi on it…

So maybe it’s indeed based on sip, I don’t know :frowning:

The only way my guess is to use the hikconnect cloud integration, or setup sip on it, and use asterisk and their integration to grab call events…

How it’s done by Ivms, I don’t know :frowning:

Do I need an indoor station for proper SIP integration? Other than tha captured packets using wireshark, I do not have much more to support the SIP assumption.

Does hikvision provide any kind of technical support for the SDK? Is there a forum or issue tracking system?

Are you now using Hikconnect Cloud to answer the calls? I think if you enable SIP on that devicen you cant use hikconnect anymore
No, dont know if there is technical support, but your device is too old my guess, there is no update for it anymore supporting for ISAPI/SDK

Currently it is unused I am trying to figure out what to do with it. I do not use Hikconnect cloud and actually I would like to avoid it.

So when I make this configuration inside ivms.

I capture those packets

Are those valid SIP connection attempts? Can I just deploy an asterisk and make use of it?

Hi, if you are not using HikConnect, how do you answer an call then?

All hikvisions device do commnicate indeed with a hikvision propertiary SIP protocol, thats why you see sip messages…
In orde to use the standard SIP protocol, you need to setup indeed an PBX server like asterisk, and then point the outdoorstation to use that extension, so it gets registered… then in PBX you create other extensions for your mobile users…

If you dont have an indoor, and you just want a call sensor, you can also use my register script, its normally used for indoor devices to register on, but should also work for outdoor stations, you can also define as attributes a bearer token and the sensor it should update in HA on ring event
This script is based on the sniffing i did, how the HIK SIP protocol works

Make sure you use username / extension 10010110001

change also line line 69 , to 5060 , instead of 5061 , if you dont have asterisk running yet, so you can see the invite coming in into the script, seems 5060 is always hardcoded coming from the hikvision devices

Guys, who does have an outdoor station with multiple call buttons? like for appertments
Can you do a test for me? when pressing button A or B, can you then send this command to outdoor?

curl -i --digest -u admin:XXX http://192.168.0.70/ISAPI/VideoIntercom/callerInfo?format=json

I want to extend the addon, to also actuall see who pressed the button for the call sensor

Yes. Yes. Right. It would be nice to control the arming button.