Hikvision Doorbell / Videointercom integration

Yeah, but if there is no end device ringing like an indoor station or hikconnect , then there is no call event either ... so you need something to ring to, then the event will be visible

But how do I connect Hikconnect (is that the app, Android/Apple)? I tried the app in the past, but got nowhere. Or is it the cloud service?

It fails at the step of scanning the QR-code. The response in the app is that the device is not supported.

Yeah. It's the app from Hikvision indeed :wink:

I think I'll remove the app from my phone, reset the video intercom/door bell to factory defaults and start from scratch. See if that helps. I started this connection (trying) at first with an older firmware (I think 2.x something). Perhaps the app keeps that firmware version somewhere (I hope not) and is that frustating things.

I think indeed the app stores the firmware version. I deleted the app re-installed it and now successfully connected the device.

1 Like

Hi, In my appartament I have DS-KH6320-WTE1/EU. There are 3 outdor units which are accessible for all the appartaments in the building (so they are not in my WiFi network)
In Hik-Connect I see the 3 cameras and I can unlock the doors.
So I've set output relays = 3. But only the first one is working , not the other 2 ... :frowning:

doorbells:
  - name: Interfon
    ip: 192.168.1.162
    username: admin
    password: ....
    scenes: false
    port: 8000
    output_relays: 3
system:
  log_level: DEBUG
  sdk_log_level: DEBUG
mqtt:
  username: ...
  password: ...
  host: 192.168.1....
  port: 1883

Log:

2026-05-24 02:53:37.110 | DEBUG    | mqtt:door_switch_callback:254 - Received command: ON, door_id: 0, doorbell: Interfon
2026-05-24 02:53:37.110 | DEBUG    | doorbell:unlock_door:185 - NET_DVR_RemoteControl failed with code 0, trying ISAPI
2026-05-24 02:53:37.110 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: PUT /ISAPI/AccessControl/RemoteControl/door/1 <RemoteControlDoor><channelNo>1</channelNo><cmd>open</cmd><controlType>monitor</controlType></RemoteControlDoor> 
[2026-05-24 02:53:37.122][INF] Private connect 192.168.1.162:8000 sock=53 this=0x9a926aa0 cmd=0x117001 port=47142
2026-05-24 02:53:37.175 | DEBUG    | sdk.utils:call_ISAPI:165 - Response output: 
2026-05-24 02:53:37.175 | INFO     | doorbell:unlock_door:188 -  Door 1 unlocked by SDK
[2026-05-24 02:53:37.175][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/AccessControl/RemoteControl/door/1], input size[112], max segment length[262144]
2026-05-24 02:53:47.663 | DEBUG    | mqtt:door_switch_callback:254 - Received command: ON, door_id: 1, doorbell: Interfon
2026-05-24 02:53:47.663 | DEBUG    | doorbell:unlock_door:185 - NET_DVR_RemoteControl failed with code 0, trying ISAPI
2026-05-24 02:53:47.664 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: PUT /ISAPI/AccessControl/RemoteControl/door/2 <RemoteControlDoor><channelNo>1</channelNo><cmd>open</cmd><controlType>monitor</controlType></RemoteControlDoor> 
[2026-05-24 02:53:47.669][INF] Private connect 192.168.1.162:8000 sock=53 this=0x9a926aa0 cmd=0x117001 port=33870
2026-05-24 02:53:47.697 | DEBUG    | sdk.utils:call_ISAPI:162 - Response status: <?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="urn:psialliance-org">
<requestURL>/ISAPI/AccessControl/RemoteControl/door/2</requestURL>
<statusCode>4</statusCode>
<statusString>Invalid Operation</statusString>
<subStatusCode>invalidOperation</subStatusCode>
</ResponseStatus>
Exception in thread paho-mqtt-client-:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 4523, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2297, in loop_forever
    rc = self._loop(timeout)
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1686, in _loop
    rc = self.loop_read()
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2100, in loop_read
    rc = self._packet_read()
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3142, in _packet_read
    rc = self._packet_handle()
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3808, in _packet_handle
    return self._handle_publish()
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 4145, in _handle_publish
    self._handle_on_message(message)
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 4487, in _handle_on_message
[2026-05-24 02:53:47.697][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/AccessControl/RemoteControl/door/2], input size[112], max segment length[262144]
    callback(self, self._userdata, message)
  File "/app/mqtt.py", line 215, in <lambda>
    door_switch = Switch(settings, lambda client, _, message, d=doorbell, i=door_id: self.door_switch_callback(client, (d, i), message))
  File "/app/mqtt.py", line 257, in door_switch_callback
    doorbell.unlock_door(door_id)
  File "/app/doorbell.py", line 186, in unlock_door
    self._call_isapi("PUT", url, requestBody)
  File "/app/doorbell.py", line 440, in _call_isapi
    output = call_ISAPI(self._sdk, self.user_id, http_method, url, requestBody)
  File "/app/sdk/utils.py", line 163, in call_ISAPI
    raise SDKError(sdk, f"Error while calling ISAPI {url}")
sdk.utils.SDKError: ('Error while calling ISAPI /ISAPI/AccessControl/RemoteControl/door/2', 29, 'Device operation failed.')
2026-05-24 02:55:16.763 | DEBUG    | mqtt:door_switch_callback:254 - Received command: ON, door_id: 2, doorbell: Interfon
2026-05-24 02:55:16.764 | DEBUG    | doorbell:unlock_door:185 - NET_DVR_RemoteControl failed with code 0, trying ISAPI
2026-05-24 02:55:16.764 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: PUT /ISAPI/AccessControl/RemoteControl/door/3 <RemoteControlDoor><channelNo>1</channelNo><cmd>open</cmd><controlType>monitor</controlType></RemoteControlDoor> 
[2026-05-24 02:55:16.826][INF] Private connect 192.168.1.162:8000 sock=53 this=0x9a926aa0 cmd=0x117001 port=53776
Exception in thread paho-mqtt-client-:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
2026-05-24 02:55:17.057 | DEBUG    | sdk.utils:call_ISAPI:162 - Response status: <?xml version="1.0" encoding="UTF-8" ?>
<ResponseStatus version="1.0" xmlns="urn:psialliance-org">
<requestURL>/ISAPI/AccessControl/RemoteControl/door/3</requestURL>
<statusCode>4</statusCode>
<statusString>Invalid Operation</statusString>
<subStatusCode>invalidOperation</subStatusCode>
</ResponseStatus>
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 4523, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2297, in loop_forever
    rc = self._loop(timeout)
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1686, in _loop
    rc = self.loop_read()
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2100, in loop_read
    rc = self._packet_read()
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3142, in _packet_read
    rc = self._packet_handle()
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3808, in _packet_handle
[2026-05-24 02:55:17.057][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/AccessControl/RemoteControl/door/3], input size[112], max segment length[262144]
    return self._handle_publish()
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 4145, in _handle_publish
    self._handle_on_message(message)
  File "/root/.local/lib/python3.10/site-packages/paho/mqtt/client.py", line 4487, in _handle_on_message
    callback(self, self._userdata, message)
  File "/app/mqtt.py", line 215, in <lambda>
    door_switch = Switch(settings, lambda client, _, message, d=doorbell, i=door_id: self.door_switch_callback(client, (d, i), message))
  File "/app/mqtt.py", line 257, in door_switch_callback
    doorbell.unlock_door(door_id)
  File "/app/doorbell.py", line 186, in unlock_door
    self._call_isapi("PUT", url, requestBody)
  File "/app/doorbell.py", line 440, in _call_isapi
    output = call_ISAPI(self._sdk, self.user_id, http_method, url, requestBody)
  File "/app/sdk/utils.py", line 163, in call_ISAPI
    raise SDKError(sdk, f"Error while calling ISAPI {url}")
sdk.utils.SDKError: ('Error while calling ISAPI /ISAPI/AccessControl/RemoteControl/door/3', 29, 'Device operation failed.')

Is there any trick to make the relays work also for the 2nd and 3rd channel ?

From your indoor station itself, can you do an unlock door there? My guess , they are 3 separate devices , now you are only connecting to one indoor and you can only unlock the linked outdoor station...

Hi, yes, i can unlock any of the doors from my device. U need to go on the associated camera, and then i have the unlock option. The pictures are, e. g., for the second door which is currently not working from the homeassistant App.


I maybe know why, I always send the command to channel 1.. maybe you need to send to channel 2

As a test, can you try the manually isapi command. I have included a text input service...

Use


PUT /ISAPI/AccessControl/RemoteControl/door/1 <RemoteControlDoor><channelNo>1</channelNo><cmd>open</cmd><controlType>monitor</controlType></RemoteControlDoor>

Try to play with door/channel number

Hi, something worked !!! :partying_face:

So (being not so familiar with the interface), I've pasted the command in the text.interfon_isapi_request , and it works, for me, if I change channelNo !!
e.g.:
For Channel 1, door 1

PUT /ISAPI/AccessControl/RemoteControl/door/1 <RemoteControlDoor><channelNo>1</channelNo><cmd>open</cmd><controlType>monitor</controlType></RemoteControlDoor>

or Channel2, door 1 (similar for Channel 3, door 1)

PUT /ISAPI/AccessControl/RemoteControl/door/1 <RemoteControlDoor><channelNo>2</channelNo><cmd>open</cmd><controlType>monitor</controlType></RemoteControlDoor>

in the log I do NOT receive a "classical" confirmation, but listening (from hikconnect) on 2way audio, I've heard the relay opening. Example from the log

2026-05-24 17:13:39.585 | INFO     | mqtt_input:_isapi_input_callback:730 - Received input text for doorbell: Interfon
2026-05-24 17:13:39.586 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: PUT /ISAPI/AccessControl/RemoteControl/door/1 <RemoteControlDoor><channelNo>2</channelNo><cmd>open</cmd><controlType>monitor</controlType></RemoteControlDoor> 
[2026-05-24 17:13:39.595][INF] Private connect 192.168.1.162:8000 sock=53 this=0x8c035270 cmd=0x117001 port=54994
2026-05-24 17:13:39.648 | DEBUG    | sdk.utils:call_ISAPI:165 - Response output: 
[2026-05-24 17:13:39.648][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/AccessControl/RemoteControl/door/1], input size[112], max segment length[262144]

Can I do this in a HA script ? (to define the commands for each door) or a "Hikvision Doorbell" App update is needed ? :thinking:

That's good, yeah. You can create an custom script or template switch to send that command indeed

Silly question : how do I do that ? Do I just write the string in the text.interfon_isapi_request , and then I set it back to "empty" ? Or is there any special "action" available to send the ISAPI command ?

No need to set empty. Just create a switch to send that string...

1 Like

Hi pergolafabio — love the work on this integration, really appreciate it.

I've got a working setup for ring detection + iPad popup notification, but I'm stuck on two-way audio and ISAPI answer/reject. Full details below.


Hardware

|Device|IP|Firmware|
|DS-KD8003-IME1(B) — Front Door|V2.2.78|
|DS-KV6113-WPE1(C) — Front Gate|V3.7.x|
|DS-KH9510 Indoor Station| (untouched, native HIK)|

Both doorbells registered with TECH7Fox Asterisk addon (pjsip) as PJSIP/200 and PJSIP/201 respectively. iPad runs SIP Core (also TECH7Fox) as extension 104.


The following WORKS:

  • Ring detection on both devices (door via MQTT, gate via polling)
  • SIP Core popup auto-opens on iPad when either bell is pressed
  • Gate ISAPI answer/reject (button.front_gate_answer_call, hangup, reject) all work
  • Indoor stations ring normally via native HIK protocol — not touched

Problem 1 — Front Door ISAPI answer returns badXmlContent (V2.2.78)

When I call answer or reject on the front door via ISAPI, the addon returns a badXmlContent error. The Hikvision doorbell addon appears to be sending JSON to an endpoint that only accepts XML on this firmware. The result is that I cannot stop the indoor station from ringing and cannot accept/reject the door call from HA.

Is this a known V2.2.78 bug? Is there a workaround without upgrading to V3.x? (I've held off on V3.7.1 due to reports of bricking on this model.)


Problem 2 — Two-way audio: gate works eventually but not when I want it

The gate is set up with:

  • Call Priority 1: Platform + Indoor Station (rings HIK indoor stations immediately)
  • Call Priority 2: Telephone Gateway to Asterisk (fires after Priority 1 times out, ~30s)

My HA automation fires on sensor.front_gate_call_state → ring and runs:

channel originate PJSIP/104 application Wait 60 callerid "Front Gate" <201>

This gives the iPad a SIP popup with ringing — which is great. But the application is Wait 60 (silence), so answering gives no audio.

What I want is: when the iPad user answers the popup → audio bridges directly to the gate.

I tried changing to application Dial PJSIP/201 in the CLI originate command, but hit the issue that the gate is already busy in its Priority 1 HIK call when our originate fires. So Asterisk calling the gate back gets no response from the device at that moment.

Interestingly: When Priority 2 eventually fires (~30s after button press), the gate calls Asterisk, Asterisk routes it through [104@default:1]Dial(PJSIP/104/...), and the iPad DOES get a real call with two-way audio confirmed. But that's a 30-second delay after the HIK stations ring.

My question: What's the correct approach to get immediate two-way audio when the iPad answers the SIP Core popup, without waiting for Priority 2? Is there a dialplan configuration or originate syntax that bridges iPad ↔ gate correctly? Should I be using a different Asterisk application?


Problem 3 — SIP Core popup camera feed not showing for gate

The SIP Core popup_config has:

extensions:  "201":    name: Front Gate    camera_entity: camera.front_gate

Camera feed shows fine for camera.front_door (ext 200), but the gate popup shows no video. I suspect camera.front_gate is backed by the Hikvision integration as an RTSP-only entity, and the webrtc-camera component used internally by the SIP Core popup needs a go2rtc stream. Is that correct, and what's the recommended way to point the popup to a go2rtc stream for the gate?


Thanks in advance.. happy to share any logs or config if helpful.

Hmm, not following, you are using SIP, why do you want isapi then, you don't need it at all. If you go the SIP road...

To give context on why we went ISAPI: we tried channel originate PJSIP/104 application Dial PJSIP/201 but used wrong CLI syntax (Dial(PJSIP/201) with parentheses) which threw "No such application" - So we assumed Dial wasn't the right path and fell back to Wait 60 + ISAPI to at least stop the HIK ringing. The door ISAPI was broken anyway (badXmlContent on V2.2.78), so we ended up stuck in a dead end.

The 30s delay isn't workable - I need the iPad and indoor stations ringing simultaneously. Two questions:

  1. If I keep Priority 1 as Platform + Indoor Station and run channel originate PJSIP/104 application Dial PJSIP/201 from an HA automation, will the gate accept the incoming Asterisk SIP call while it's already in the Priority 1 HIK session?
  2. If the iPad answers that SIP call - Does the gate signal the indoor stations to stop ringing?

If you are using SIP, my guess the answer/reject/... commands (isapi) dont work, you cant combine those, you need to use asterik to hangup channels

will try it tmorro n let you know