Hikvision Doorbell / Videointercom integration

Have a look at first post, I added some examples there

I think you are referring to the first post of the first thread. I tried those. This device (DS-KV8103-IME2) is the older two wire one. I recall vaguely (I had it working before) that it had a strange URL and I can’t remember what it was, and also I cannot remember where I found out what the URL was.

Ah ok, sorry don’t have this device, maybe others can help…

1 Like

So have you tried it?
“rtsp://admin:[email protected]:554/ISAPI/Streaming/Channels/101/”

“rtsp://admin:[email protected]:554”

Neither of those work.

Managed to get it to work in the software I was using. Problem was it did not work in VLC and elswhere but it does work in the software. I was testing with VLC.
rtsp://admin:[email protected]:554/Streaming/Channels/101

Yeah at the moment it is hard-coded, sorry @leonidostrovski for any trouble with your specific setup.
You can track the progress for this specific feature here: Make port 8000 / 1883 configurable · Issue #108 · pergolafabio/Hikvision-Addons · GitHub

3 Likes

Now you can with the last add-on update. I’m finally able to turn off my RPi permanently and use my new MiniPC with a dedicated LXC to run broker.

1 Like

Great you like it, addon is almost finished for final release :frowning:

1 Like

Hello does anybody have a video tutorial how to setup asterisk and hikvision doorbell to use in homeassistant to communicate with the doorbell?
i found this Hikvision-Addons/asterisk/asterisk.as.indoor.md at dev · pergolafabio/Hikvision-Addons · GitHub
but it would be nice if anybody has a video tutorial…

a video tutorial? what does it explain more then those settings? i can just make screenshots of the config? :slight_smile:

Btw, if you are unfamiliar with SIP and you want to use, start with some basic functions, setting up Asterisk, make calls between 2 clients, get famailiar with it… my approach is using the HIK protocol, you dont lear that one 1 day, believe me

yeah i already installed it and configured but its not working…
I want to do the call over homeassistant if i am at home and somebody pushs the button on the doorbell. I think the video call will initialize faster then the hik-connect app, because in the app i am waiting 5 seconds till a image and sound appears…

if you use my indoor setup, there should no delay, cause asterisk acts as extension from the primary indoor, they all ring at same time… also hikconnect should be slow, since the image is coming from cloud

when using asterisk, all is local, should be faster and instant

First of all. Thank you for creating this beautiful add-on. Unfortunately, its been a while since I have used hass. However, in the that time I was trying to set up the indoor station (DS-KH6320-WTE1) + outdoor station (DS-KD8003) to be completely run by SIP protocol. The experiment used FreePBX as an asterisk SIP server (yes…I’m bad with config files) and was able to relay both video + audio through all extensions and SIP phones. Early video is working when someone calls, and the Door lock on (Normally Open 1) works as intended. Keep in mind that I have updated to the latest firmware version for both devices, and Hik-Connect works for opening and closing both relay modules. However, the only issue lies in the notification platform as it does not receive any messages or push notifications. I will try configuring asterisk (FreePBX) as an extension as per your method and relay my findings.

Hey, you are correct, asterisk or freepbx doesn’t use push to wake up the softphone…

But what’s interesting, you say you have early video?? Do you see video on ALL sip endpoints when you dial a group of endpoints? That normally is not possible, asterisk doesn’t have a function to send early media to multiple phones… So are you sure you have “early video” , video before pickup when dialibg multiple members?

Anyway, my asterisk approach doesn’t use push…
If you want push you need to setup an proxy like flexisip… Or there are clients like Linphome, if you use those free accounts, like [email protected] you have push too …
There is also acrobits sofphone, that have push , even when using your extension on asterisk

yes that is what I thought
can you take screenshots of your setup?

But i already shared my config? A screenshot is just the same ? it doesnt tell you more? Why do you want a screenshot of a configuration?

Hi,

really great addon. I set it up as a standalone docker container yesterday as described here https://github.com/pergolafabio/Hikvision-Addons/blob/d91946d2162bdc3938fe89c854a6972007c516bc/hikvision-doorbell/docs/docker.md

I use an extra mosquitto docker container and have connected HA and the hikvision-doorbell container with it and the login works. I first connected the doorbell and then HA mqtt plugin and HA almost immediatly got the device and entities. But then the entities became “not available” directly.

I tested the doorbell, rang the bell and unlocked the door from inside some times. Here is the log from the doorbell container:

[2023-07-28 06:11:58.762][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:13:23.891][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:14:38.993][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:14:54.017][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:16:29.165][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:17:54.309][DBG] Alarm chan [0] recv timeout[2]!
2023-07-28 06:18:04.293 | DEBUG    | event:_handle_callback:192 - Callback invoked from SDK
[2023-07-28 06:18:04.293][INF] Alarm[0] IP[192.168.x.x] data_len[568] alarm_len[568] status[430]
2023-07-28 06:18:04.295 | DEBUG    | event:_invoke_handlers:166 - Invoking 2 handlers
2023-07-28 06:18:04.295 | INFO     | event:video_intercom_alarm:109 - Video intercom alarm from outdoor
2023-07-28 06:18:04.295 | INFO     | mqtt:video_intercom_alarm:255 - Doorbell ringing, updating sensor
settings: mqtt=MQTT(host='192.168.y.y', username='doorbell', password='xxxxxxxxxxx', client_name=None, tls_key=None, tls_certfile=None, tls_ca_cert=None, di                         scovery_prefix='homeassistant', state_prefix='hmd') entity=SensorInfo(component='sensor', device=DeviceInfo(name='outdoor', model='VDM10-VM-2W', manufacturer='H                         ikvision', sw_version='V2.0.8', hw_version='0x1701', identifiers='866877494845867745508748495048504949494955828274485557xxxxxxxxxxxxxx', connections=None, configu                         ration_url=None), device_class=None, enabled_by_default=None, entity_category=None, expire_after=None, force_update=None, icon='mdi:bell', name='Call state', ob                         ject_id='outdoor_call_state', qos=None, unique_id='866877494845867745508748495048504949494955828274485557xxxxxxxxxxxxxx-call_state', unit_of_measurement=None) deb                         ug=False manual_availability=True
topic_prefix: sensor/outdoor/Call-state
config_topic: homeassistant/sensor/outdoor/Call-state/config
state_topic: hmd/sensor/outdoor/Call-state/state
wrote_configuration: True

2023-07-28 06:18:14.127 | DEBUG    | event:_handle_callback:192 - Callback invoked from SDK
2023-07-28 06:18:14.128 | DEBUG    | event:_invoke_handlers:166 - Invoking 2 handlers
2023-07-28 06:18:14.128 | INFO     | event:video_intercom_alarm:109 - Video intercom alarm from outdoor
[2023-07-28 06:18:14.127][INF] Alarm[0] IP[192.168.x.x] data_len[568] alarm_len[568] status[430]
2023-07-28 06:18:14.129 | INFO     | mqtt:video_intercom_alarm:258 - Call dismissed, updating sensor
settings: mqtt=MQTT(host='192.168.y.y', username='doorbell', password='xxxxxxxxxxx', client_name=None, tls_key=None, tls_certfile=None, tls_ca_cert=None, di                         scovery_prefix='homeassistant', state_prefix='hmd') entity=SensorInfo(component='sensor', device=DeviceInfo(name='outdoor', model='VDM10-VM-2W', manufacturer='H                         ikvision', sw_version='V2.0.8', hw_version='0x1701', identifiers='866877494845867745508748495048504949494955828274485557xxxxxxxxxxxxxx', connections=None, configu                         ration_url=None), device_class=None, enabled_by_default=None, entity_category=None, expire_after=None, force_update=None, icon='mdi:bell', name='Call state', ob                         ject_id='outdoor_call_state', qos=None, unique_id='866877494845867745508748495048504949494955828274485557xxxxxxxxxxxxxx-call_state', unit_of_measurement=None) deb                         ug=False manual_availability=True
topic_prefix: sensor/outdoor/Call-state
config_topic: homeassistant/sensor/outdoor/Call-state/config
state_topic: hmd/sensor/outdoor/Call-state/state
wrote_configuration: True

[2023-07-28 06:18:49.395][DBG] Alarm chan [0] recv timeout[2]!
2023-07-28 06:18:51.578 | DEBUG    | event:_handle_callback:192 - Callback invoked from SDK
2023-07-28 06:18:51.579 | DEBUG    | event:_invoke_handlers:166 - Invoking 2 handlers
2023-07-28 06:18:51.579 | INFO     | event:video_intercom_alarm:109 - Video intercom alarm from outdoor
2023-07-28 06:18:51.579 | INFO     | mqtt:video_intercom_alarm:255 - Doorbell ringing, updating sensor
settings: mqtt=MQTT(host='192.168.y.y', username='doorbell', password='xxxxxxxxxxx', client_name=None, tls_key=None, tls_certfile=None, tls_ca_cert=None, di                         scovery_prefix='homeassistant', state_prefix='hmd') entity=SensorInfo(component='sensor', device=DeviceInfo(name='outdoor', model='VDM10-VM-2W', manufacturer='H                         ikvision', sw_version='V2.0.8', hw_version='0x1701', identifiers='866877494845867745508748495048504949494955828274485557xxxxxxxxxxxxxx', connections=None, configu                         ration_url=None), device_class=None, enabled_by_default=None, entity_category=None, expire_after=None, force_update=None, icon='mdi:bell', name='Call state', ob                         ject_id='outdoor_call_state', qos=None, unique_id='866877494845867745508748495048504949494955828274485557xxxxxxxxxxxxxx-call_state', unit_of_measurement=None) deb                         ug=False manual_availability=True
topic_prefix: sensor/outdoor/Call-state
config_topic: homeassistant/sensor/outdoor/Call-state/config
state_topic: hmd/sensor/outdoor/Call-state/state
wrote_configuration: True

[2023-07-28 06:18:51.578][INF] Alarm[0] IP[192.168.x.x] data_len[568] alarm_len[568] status[430]
2023-07-28 06:18:59.214 | DEBUG    | event:_handle_callback:192 - Callback invoked from SDK
2023-07-28 06:18:59.215 | DEBUG    | event:_invoke_handlers:166 - Invoking 2 handlers
2023-07-28 06:18:59.215 | INFO     | event:video_intercom_event:98 - Video intercom event from outdoor
2023-07-28 06:18:59.216 | INFO     | mqtt:video_intercom_event:216 - Door 2 unlocked by 494848494849494848xxxxxx, updating sensor Door 2 relay
[2023-07-28 06:18:59.214][INF] Alarm[0] IP[192.168.x.x] data_len[34548] alarm_len[34548] status[431]
2023-07-28 06:19:06.847 | DEBUG    | event:_handle_callback:192 - Callback invoked from SDK
[2023-07-28 06:19:06.847][INF] Alarm[0] IP[192.168.x.x] data_len[568] alarm_len[568] status[430]
2023-07-28 06:19:06.848 | DEBUG    | event:_invoke_handlers:166 - Invoking 2 handlers
2023-07-28 06:19:06.848 | INFO     | event:video_intercom_alarm:109 - Video intercom alarm from outdoor
2023-07-28 06:19:06.848 | INFO     | mqtt:video_intercom_alarm:258 - Call dismissed, updating sensor
settings: mqtt=MQTT(host='192.168.y.y', username='doorbell', password='xxxxxxxxxxx', client_name=None, tls_key=None, tls_certfile=None, tls_ca_cert=None, di                         scovery_prefix='homeassistant', state_prefix='hmd') entity=SensorInfo(component='sensor', device=DeviceInfo(name='outdoor', model='VDM10-VM-2W', manufacturer='H                         ikvision', sw_version='V2.0.8', hw_version='0x1701', identifiers='866877494845867745508748495048504949494955828274485557xxxxxxxxxxxxxx', connections=None, configu                         ration_url=None), device_class=None, enabled_by_default=None, entity_category=None, expire_after=None, force_update=None, icon='mdi:bell', name='Call state', ob                         ject_id='outdoor_call_state', qos=None, unique_id='866877494845867745508748495048504949494955828274485557xxxxxxxxxxxxxx-call_state', unit_of_measurement=None) deb                         ug=False manual_availability=True
topic_prefix: sensor/outdoor/Call-state
config_topic: homeassistant/sensor/outdoor/Call-state/config
state_topic: hmd/sensor/outdoor/Call-state/state
wrote_configuration: True

[2023-07-28 06:21:04.596][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:21:14.611][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:22:39.751][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:24:04.874][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:25:45.023][DBG] Alarm chan [0] recv timeout[2]!
2023-07-28 06:26:26.238 | DEBUG    | event:_handle_callback:192 - Callback invoked from SDK
2023-07-28 06:26:26.239 | DEBUG    | event:_invoke_handlers:166 - Invoking 2 handlers
2023-07-28 06:26:26.239 | INFO     | event:video_intercom_event:98 - Video intercom event from outdoor
2023-07-28 06:26:26.239 | INFO     | mqtt:video_intercom_event:216 - Door 2 unlocked by 494848494849494848xxxxxx, updating sensor Door 2 relay
[2023-07-28 06:26:26.238][INF] Alarm[0] IP[192.168.x.x] data_len[37607] alarm_len[37607] status[431]
[2023-07-28 06:28:35.294][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:30:00.419][DBG] Alarm chan [0] recv timeout[2]!
[2023-07-28 06:31:20.552][DBG] Alarm chan [0] recv timeout[2]!

There was no update in HA entities.
So for the last ringing/unlocking I enabled the MQTT debug logging in HA and got this:

2023-07-28 08:26:26.241 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on hmd/switch/outdoor/Door-2-relay/attributes (qos=0): b'{"control source": "494848494849494848xxxxxx"}'
2023-07-28 08:26:26.283 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on hmd/switch/outdoor/Door-2-relay/state (qos=0): b'ON'
2023-07-28 08:26:28.243 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on hmd/switch/outdoor/Door-2-relay/state (qos=0): b'OFF'

It seems that the connection with MQTT is not an issue but somehow the messages are not reflected in HA entity updates or something like this.

Do you have an advice what I could check or do to make it work?

Thank you very much and best regards!