Hikvision Doorbell / Videointercom integration

seems i had an error on the caller info button, i uploaded a new version,dont use the BETA addon anymore, 3.0.1 is now released as stable release!

You will see still this error , on your indoor on “idle” state, but thats normal… It shoudl only provide the caller_info on “ringing” event…

2023-08-30 20:23:39.706 | ERROR | mqtt_input:_caller_info_callback:331 - Error while getting caller info: ('Error while calling ISAPI /ISAPI/VideoIntercom/callerInfo?format=json', 29, 'Device operation failed.')

Hey @pergola.fabio, in Android it works without the need os SSL.
Again, I am using the Home Assistant app on iOS, so I do not believe SSL is necessary, but I am not sure.
I am not really sure how to use SSL with zero trust. I need to validate that.
But the fact that it works with Android via web or app without any SSL makes me think that it should work with iOS as well.

Hmm, not sure, on desktop with chrome , with http, it doesn’t work either, you need to specify a flag in chrome to make use of the mic while in http mode…
I think https with valid SSL is necessary, unless you can grant permissions manually that’s why maybe android works and not iPhone?

Maybe for test you can setup a duckdns account?

@pergola.fabio Firstly, I want to thank you for your response.
Given that I currently use Cloudflare’s Zero Trust, which is very simple to use, do you think I can do anything to avoid using this solution (Duckdns)?

If not, I will need to expose the 443 port in my router and set up a proxy to define what is internal and what is external, which is what I previously did (Long long time ago 3Y back), but the zero trust solution came along and I found it to be much, much better.

Adding to that do you think that it also might effect the APP it self …in such of away that it is not utilized SSL and connected via Zero trust to a regular Http address and due to that It is not working also in the app ?

Is there any chance that you can simulate it on a simulator that display Home assistant under iOS and see by your self how it is acting :confused:
I have no idea where to start.
AlexxIT mention that an iOS expert maybe can answer that … but I found it odd that I’m the fist one that using this solution on iOS Home Assistant App

I don’t have experience with iPhone or zero trust… I use nginx for https access… Maybe create a new community thread here also…there must be someone using frigate and two way audio with iPhone!

Is it safe to just delete and reinstall the main one? could be any impact?

No, the main and beta are now almost identical, just make sure you are not running 2 add-ons at once, just stay on main now, dont use beta anymore

1 Like

do you know if maybe Nabu Casa uses SSL ? or is it like the Zero Trust Solution?

I might use that as a fast-testing, I will also try to share that in the community.
Worst-case scenario I will open the 443 port and set up nginx solution.
But yet again, it is crazy that in Android home assistant works like a charm! and in iOS it is not :/…

Hmm not sure, but I think nabucasa will work indeed, you can test first on Android companion app with nabucasa url

Android with Nabucasa not relevant since i know that Android works anyway with the correct solution of Zero trust + Home Assistant.
Zero trust + browser = works as expected.

*** update
iOS via Safari + zero trust WORKS!
iOS via Home assistant + Zero trust - Not works ---- so this is something with the Home Assistant App on iOS…
iOS via Chrome + Zero trust - Not work

1 Like

It still doesn’t seem to work (I switched to 3.0.1 stable). This time I only get an error when indoor is “idle”, but when it’s “ringing” I don’t see any results at the log.

In the following log, I first pressed the caller info button when idle, then I pressed the button on the physical outdoor unit and then again (twice) the caller info button of the indoor unit. I also pressed the hangup and answer commands of the indoor unit, and they don’t seem to work. I’m not sure if it’s related or not. My indoor is an DS-KH6320-WTE2 firmware V2.1.60.

2023-08-31 21:24:07.436 | INFO     | mqtt_input:_caller_info_callback:318 - Received caller info command for doorbell: IndoorFloor2
2023-08-31 21:24:07.470 | ERROR    | mqtt_input:_caller_info_callback:331 - Error while getting caller info: ('Error while calling ISAPI /ISAPI/VideoIntercom/callerInfo?format=json', 29, 'Device operation failed.')
2023-08-31 21:24:17.343 | INFO     | event:video_intercom_alarm:109 - Video intercom alarm from ExternalDoor
2023-08-31 21:24:17.344 | INFO     | mqtt:video_intercom_alarm:291 - Doorbell ringing, updating sensor 
settings: mqtt=MQTT(host='core-mosquitto', username='addons', password='yeiqu7Dahwu3ie9Weha6j', client_name=None, tls_key=None, tls_certfile=None, tls_ca_cert=None, discovery_prefix='homeassistant', state_prefix='hmd') entity=SensorInfo(component='sensor', device=DeviceInfo(name='ExternalDoor', model='DS-KD8003-IME1/EU', manufacturer='Hikvision', sw_version='V2.2.56', hw_version='0x0', identifiers='6883457568564848514573776949476985484950485049485550558282715250485552514951', connections=None, configuration_url=None), device_class=None, enabled_by_default=None, entity_category=None, expire_after=None, force_update=None, icon='mdi:bell', name='Call state', object_id='externaldoor_call_state', qos=None, unique_id='6883457568564848514573776949476985484950485049485550558282715250485552514951-call_state', unit_of_measurement=None) debug=False manual_availability=True
topic_prefix: sensor/ExternalDoor/Call-state
config_topic: homeassistant/sensor/ExternalDoor/Call-state/config
state_topic: hmd/sensor/ExternalDoor/Call-state/state
wrote_configuration: True
        
2023-08-31 21:24:20.436 | INFO     | mqtt_input:_caller_info_callback:318 - Received caller info command for doorbell: IndoorFloor2
2023-08-31 21:24:25.614 | INFO     | mqtt_input:_caller_info_callback:318 - Received caller info command for doorbell: IndoorFloor2
2023-08-31 21:24:28.798 | INFO     | mqtt_input:_hangup_call_callback:288 - Received hangup command for doorbell: IndoorFloor2
2023-08-31 21:24:28.803 | ERROR    | mqtt_input:_hangup_call_callback:300 - Error while hanging up call: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 23, 'Device does not support this function.')
2023-08-31 21:24:33.002 | INFO     | mqtt_input:_answer_call_callback:303 - Received answer command for doorbell: IndoorFloor2
2023-08-31 21:24:33.009 | ERROR    | mqtt_input:_answer_call_callback:315 - Error while answering call: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 29, 'Device operation failed.')

Hi, no you don’t see it in the log, you will see the caller info as an attribute on the button itself :slight_smile:

Based on the attribute you can build your automation

You will see it in log , if you enable debug on the addon config…

But i will make it visible on next version, showing as “info” too, its indeed better for troubleshooting :slight_smile:

try 3.0.2 release

Hi. Trying your addon with HiWatch VDP-D2211W(B), since this is a Hikvision label I think it will work.

I got ISAPI connection working with beta 3.0 version, I can use Open Relay Button and it works and i can see call state updating.

Switching to version 3.0.2 - I got doubles of all buttons in MQTT, but no available relay switch or call state sensor.

My doorbell is set to call the iVMS I have no indoor station
My testing setup - Calling via button, then I pressed all buttons in the integration - no effect on the call status. Then I opened door using my card.
Every action seams to be logged, but call is unaffected by buttons.
Maybe I have done something wrong?

2023-09-01 12:58:13.286 | INFO     | mqtt:video_intercom_alarm:291 - Doorbell ringing, updating sensor 
settings:  ...(cut by me due to unmasked credentials)...
topic_prefix: sensor/doorbell/Call-state
config_topic: homeassistant/sensor/doorbell/Call-state/config
state_topic: hmd/sensor/doorbell/Call-state/state
wrote_configuration: True
        
2023-09-01 12:58:30.113 | INFO     | mqtt_input:_answer_call_callback:303 - Received answer command for doorbell: doorbell
2023-09-01 12:58:34.185 | INFO     | mqtt_input:_reject_call_callback:273 - Received reject command for doorbell: doorbell
2023-09-01 12:58:36.115 | INFO     | mqtt_input:_reject_call_callback:273 - Received reject command for doorbell: doorbell
2023-09-01 12:58:36.653 | INFO     | mqtt_input:_reject_call_callback:273 - Received reject command for doorbell: doorbell
2023-09-01 12:58:37.457 | INFO     | event:video_intercom_alarm:109 - Video intercom alarm from doorbell
2023-09-01 12:58:37.458 | INFO     | mqtt:video_intercom_alarm:294 - Call dismissed, updating sensor 
... 
2023-09-01 12:58:40.003 | INFO     | event:motion_detection:87 - Motion detected from doorbell
2023-09-01 12:58:40.807 | INFO     | event:video_intercom_event:98 - Video intercom event from doorbell
2023-09-01 12:58:40.807 | INFO     | mqtt:update_door_entities:229 - Door 1 unlocked

Other then that I want to check two-way audio but linked tutorials (frigate and SIP) got 404. Maybe due to repo update they got deleted.

Hi,

about the doubles: stop the addon, delete the MQTT intergration (devices) , start the addon
(make sure you dont run the 2 addons at once)

Indeed, i moved the docs for frigate/asterisk into another place, i will fix the links!
The commands answer/reject/hangup do work, but sometimes you need to send to indoor or to outdoor
Reject => works, but only when indoor is in ringing state
Hangup => works, but only if the indoor accepted the call => then you need to send to indoor
Answer => works on indoor, but the indoor aborts the call afterwards, this command is only usefull if you want to start manually an two way audio call using frigate

So, these buttons may not work if I have no indoor station?
Is there a way to use center(iVMS) with this addon?

Is there a full list of services provided by SDK? I want to try to intercept the call from outdoor to center and send a screenshot from camera.

indeed, its possible you need an indoor station for those commands
There is no relationship with IVMS… this is just addon to listen for events for indoor/outdoor stations

You can find all docs about SDK here : HiTools - Tools - Hikvision

Dont you see the call event triggered to IVMS? if yes , then you can make a snapshot from the camera, should work

Log shows the call to iVMS. If I close the center the call fails immediately and the station reports an error by voice. So I think for the staion it is irrelevant what to call.

Which SDK command is used in your answer button? Maybe all I need is some params changed for the center.

for those commands i use the ISAPI

        url = "/ISAPI/VideoIntercom/callSignal?format=json"
        requestBody = {
            "CallSignal": {
                "cmdType": "answer"
            }
        }

see here: