Hikvision Doorbell / Videointercom integration

It should give events indeed about illegal code, of door was open, there is an “control_source” attribute on the relay switch entity

Thanks for the fast reply. That’s useful to know. I didn’t quite understand though in your reply, does it generate a log of “who” opened the gate, ie which user code was entered?

Cheers

Yes, you can check the attributes of the relay sensor, there is an ID visible, but it’s not the key, but you can at least make automations on it, since it’s uniqueu

HI.

What a long thread and a lot of work! Well done guys.

I may now be “blind” to seeing the information I am looking for due to reading so much info!

In summary, I have a HIKVISION DS-KV6113-WPE(B). The Doorbell press is somewhat random through the HIKConnect app so I want to read a door bell press and make a “Ring” sound on my Sonos audio system.

I have the DS-KV6113 feeding video to my Synologly Surveillance Station OK and is on my home network.

The 1st problem is to detect the door bell press.

What I am not clear about is can this intergration be installed on a Home Assistant RPi Green ?

I see the application in HACS but am not clear about the meaning of this sentence " If you have direct LAN access to your Hikvision device, you may NOT want to use this integration.

Because I am already connected to the Door bell on my home network, does this mean I may not want to add it?

I’m very new to Home Assistant so taking things carefully on a massive learning curve.

If I can achieve what I need, how should I go about it? I am not sure on what the MQTT set up means and if it is applicable to my current set up.

I do hope that I can use this integration as the HIK Connect app is pretty unreliable and we often miss people coming to the door.

Thanks in advance.

Hi, this thread is about the addon, the integration you find in Hacs is for hikconnect… It’s indeed a cloud integration…
Try to use the addon, it’s based on local , it gives you events like door press

Hey, is there a chance to add feature regarding rtsp stream for this addon (and Hikvision KV9503 device)?

I am trying to achieve rtsp streaming to one of my local devices when intercom started ringing.

I couldn’t get rtsp stream from ringbell using several standard camera addons including:

The only one that works is Frigate, but it is huge integration consuming a lot of resources just because of population one rtsp stream.

I can easily open rtsp stream using VLC app and it is streaming seamlessly, but couldn’t do that with HA standard integrations.

Thanks for any hint regarding this.

hi, the addon is based on MQTT, its difficult to create an camera entity
should work with the generic camera integration

Frigate is changing, there will be a new friigate card with no need for the frigate addon

I see, thanks.

Would appreciate correct settings for hikvision doorbels for generic camera addon, I think i tried every reasonable combination of parameters, nothing worked. Then I put only rtsp://admin:passs@ip/channel/101 and it just works in VLC.

Thanks one more.

Can you show the config? I don’t use it , other people probably can help,…
I use the synology

It seems I got it, just needed some pressure :smiley:

This is correct configuration for Hikvision KV9503 doorbell rtsp stream.
Thanks :slight_smile:

I have added the integration and been trying to get it to work when the door bell button is pressed on my DS-KV6113.

I am have a degree of success.

When the door bell is pressed , it does trigger and turn on a Hive light I am testing with.

But it is also randomly triggering every minute os, sometime more frequently.

Its as if there is a “phantom” door bel press.

Here is my Automation as set up using the visual editor in HA>

What am I doing “wrong”?

Thanks

you need to make the state to : to: ringing …

Exactly, you need to ‘ring/ringing’ state, not just empy. It could match anything and I have noticed, it is in ‘unavailable’ state sometimes. Especially when asking for CallStatus state frequently using “push button” method.

You don’t need to push the button to get call status… That’s something I added, only for devices that don’t give the event for the ringing… :slight_smile:

Hi Fabio, everybody.
I got a rather interesting access panel/intercom/doorbell HIKVision DS-K1T341CMFW, which can do multi-factor authentication (face, RFID, fingerprint) and a video intercom as well.
As an access device, the thing lived up to expectations. But the intercom is a complete… disappointment.
The panel does not support at normal SIP at all, only HIK-Connect and the strange Chinese SIP dialect, where SDP is in XML format
(Same with used in your projects)

Unfortunately, the «asterisk hack» attached in your project didn’t working for this panel registration in asterisk. But panel have an option to call «Contact center» with configurable IP address without registration

Today I’ve made small patch for asterisk’s chan_sip to force assign codecs to peer with panel and now I’m almost succeed to receive call from directly from panel to asterisk, but panel drops calls immediately after establishing, because I didn’t got how to pass throw port and codec information back to panel from asterisk

Have you (or somebody) complete tcpdump of establishing session between doorbell and indoor module? It may helps to complete work on chan_sip

Current SIP exchange achieved (11.163 = panel, 11.4 = asterisk):

2024/06/02 17:38:07.718005 192.168.11.163:5060 -> 192.168.11.4:5060
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.163:5060;rport;branch=z9hG4bK1274956935
From: <sip:[email protected]>;tag=560093439
To: <sip:[email protected]:5060>
Call-ID: 746128789
CSeq: 20 INVITE
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Max-Forwards: 70
User-Agent: eXosip/3.6.0
Subject: This is a call for conversation
Content-Length:   158

v=0
o=AW7699694 0 0 IN IP4 192.168.11.163
s=Talk session
c=IN IP4 192.168.11.163
t=0 0
a=doorFloor:1
a=responseType:0
a=doorType:0
a=isSpecialType:0

>>note- no media info in SDP, defaulted by chan_sip patch

2024/06/02 17:38:07.732420 192.168.11.4:5060 -> 192.168.11.163:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.11.163:5060;branch=z9hG4bK1274956935;received=192.168.11.163;rport=5060
From: <sip:[email protected]>;tag=560093439
To: <sip:[email protected]:5060>
Call-ID: 746128789
CSeq: 20 INVITE
Server: Asterisk PBX 20.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Length: 0

2024/06/02 17:38:07.734434 192.168.11.4:5060 -> 192.168.11.163:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.11.163:5060;branch=z9hG4bK1274956935;received=192.168.11.163;rport=5060
From: <sip:[email protected]>;tag=560093439
To: <sip:[email protected]:5060>;tag=as72bdf4f1
Call-ID: 746128789
CSeq: 20 INVITE
Server: Asterisk PBX 20.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 179

v=0
o=root 94094817 94094817 IN IP4 192.168.11.4
s=Asterisk PBX 20.4.0
c=IN IP4 192.168.11.4
t=0 0
m=audio 10440 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=maxptime:150
a=sendrecv


2024/06/02 17:38:07.738990 192.168.11.163:5060 -> 192.168.11.4:5060
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.163:5060;rport;branch=z9hG4bK432473706
From: <sip:[email protected]>;tag=560093439
To: <sip:[email protected]:5060>;tag=as72bdf4f1
Call-ID: 746128789
CSeq: 20 ACK
Contact: <sip:[email protected]:5060>
Max-Forwards: 70
User-Agent: eXosip/3.6.0
Content-Length: 0

2024/06/02 17:38:07.871729 192.168.11.163:5060 -> 192.168.11.4:5060
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.163:5060;rport;branch=z9hG4bK1386542103
From: <sip:[email protected]>;tag=560093439
To: <sip:[email protected]:5060>;tag=as72bdf4f1
Call-ID: 746128789
CSeq: 21 BYE
Contact: <sip:[email protected]:5060>
Max-Forwards: 70
User-Agent: eXosip/3.6.0
Content-Length: 0




2024/06/02 17:38:07.872986 192.168.11.4:5060 -> 192.168.11.163:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.11.163:5060;branch=z9hG4bK1386542103;received=192.168.11.163;rport=5060
From: <sip:[email protected]>;tag=560093439
To: <sip:[email protected]:5060>;tag=as72bdf4f1
Call-ID: 746128789
CSeq: 21 BYE
Server: Asterisk PBX 20.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


Hm, maybe I have a TCP dump still somewhere…

But the asterisk guide I published on GitHub is for indoor extensions… If you want to register directly using the Hikvision SIP protocol on your outdoor the username is different… Make sure to run asterisk chan sip on port 5060, it’s hardcodes to receive invite event from Hikvision…

You need to register asterisk directly on your outdoor station running on port 5065 !! Use this as username: 10010100000

Then normally you can receive the call on Asterisk to initiate the dialplan… I did this before , it worked for video, but never got audio, maybe you patch will do the trick… I never looked at it, since I have indoor stations, and the outdoor station can’t ring to multi contacts anyway

Also turn off the message center, my Hikvision device can’t ring both private sip and message center, probably yours can’t either

I’ve completely failed with proposed “hybrid registration” approach
there are no Invites from doorphone to asterisk:5060 afterword

I’ve tried 10010100005, 10010100000, 10000000005 extensions and configured “Call indoor station = 5”
Where I’m wrong?

That was reason for me to trying emulate “Call to ManageCenter” scenario
(At least, if I specify asterisk’s IP in Management Center field, INVITEs on port 5060 starts to come)

I will appreciate for any help…

Thanks. I have made progress and the Automation was reliably turning on a Hive light when the door bell was pressed.

However, I am unable to get the Sonos to play the door bell sound.

The trigger works and runs the automation OK. But no sound.

I have the .mp3 file in the HA media folder and it plays OK when looking on the HA browser.

Any ideas why the door bell sound is not being played from the Sonos?

The only thing I can think off is that the path to the .mp3 is not formed correctly, but looks OK

i dont think you can play mp3 files like that, why not store them and use path or something instead of http ? does the service actually work without the automation?
Probably you can find a lot of examples on these forums to play mp3 files :slight_smile: