Hikvision Doorbell / Videointercom integration

I am using the Frigate (Full) and the Hikvision Doorbell with the Frigate HASS card.
The 2 way audio is working (unmute and when the tap_action is pressed but the MQTT answer command generates the following error thus is not stopping the intercom ring.

2023-12-10 19:12:30.219 | INFO     | mqtt_input:_answer_call_callback:344 - Received answer command for doorbell: home_front_gate
2023-12-10 19:12:30.261 | ERROR    | mqtt_input:_answer_call_callback:357 - Error while answering call with ISAPI: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 11, 'The data sent to the device is illegal, or the data received from the device error.  E.g. The input data is not supported by the device for remote configuration.')
[2023-12-10 19:12:30.260][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/VideoIntercom/callSignal?format=json], input size[37], max segment length[262144]

The unmute, mute and reboot do work.
The answer, reject and hang up MQTT show the same error as above.

BTW, I have just upgraded the 8003 to 2.2.62 but I did not factory reset the unit and re-defined it as the local support requested. I have no idea if this is the issue.

Hi, that error is normal, if you have an indoor station, you need to send answer/reject/hangup commands to indoor stations, you can add them also in the addon config

Testing it with the indoor unit. I have 2 of them.

The error is different. (There is no active ringing when I send the command).

2023-12-10 20:09:07.006 | ERROR    | mqtt_input:_hangup_call_callback:334 - Error while Hanging up the call with ISAPI: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 29, 'Device operation failed.')
[2023-12-10 20:09:07.005][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/VideoIntercom/callSignal?format=json], input size[37], max segment length[262144]
[2023-12-10 20:09:14.918][DBG] Alarm chan [0] recv timeout[2]!

Is this because there is no active call?

yes indeed, only works with active call :slight_smile:
when you test hangup, you first need to send “answer”

Well while you answered I tested after ringing and it is the same.
Actually the panel does not stop the ringing.
This is what happened when I pressed the answer button twice:

2023-12-10 20:16:23.743 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from home_front_gate
2023-12-10 20:16:34.279 | INFO     | mqtt_input:_answer_call_callback:344 - Received answer command for doorbell: main_indoor_panel
2023-12-10 20:16:34.291 | ERROR    | mqtt_input:_answer_call_callback:357 - Error while answering call with ISAPI: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 29, 'Device operation failed.')
[2023-12-10 20:16:34.291][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/VideoIntercom/callSignal?format=json], input size[37], max segment length[262144]
2023-12-10 20:16:35.292 | INFO     | mqtt_input:_hangup_call_callback:321 - Received hangup command for doorbell: main_indoor_panel
2023-12-10 20:16:35.309 | ERROR    | mqtt_input:_hangup_call_callback:334 - Error while Hanging up the call with ISAPI: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 29, 'Device operation failed.')
[2023-12-10 20:16:35.309][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/VideoIntercom/callSignal?format=json], input size[37], max segment length[262144]
2023-12-10 20:16:40.023 | INFO     | mqtt_input:_answer_call_callback:344 - Received answer command for doorbell: main_indoor_panel
2023-12-10 20:16:40.035 | ERROR    | mqtt_input:_answer_call_callback:357 - Error while answering call with ISAPI: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 29, 'Device operation failed.')
[2023-12-10 20:16:40.035][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/VideoIntercom/callSignal?format=json], input size[37], max segment length[262144]
2023-12-10 20:16:41.040 | INFO     | mqtt_input:_hangup_call_callback:321 - Received hangup command for doorbell: main_indoor_panel
2023-12-10 20:16:41.053 | ERROR    | mqtt_input:_hangup_call_callback:334 - Error while Hanging up the call with ISAPI: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 29, 'Device operation failed.')
[2023-12-10 20:16:41.053][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/VideoIntercom/callSignal?format=json], input size[37], max segment length[262144]
2023-12-10 20:16:45.779 | INFO     | mqtt_input:_hangup_call_callback:321 - Received hangup command for doorbell: home_front_gate
2023-12-10 20:16:45.897 | ERROR    | mqtt_input:_hangup_call_callback:334 - Error while Hanging up the call with ISAPI: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 11, 'The data sent to the device is illegal, or the data received from the device error.  E.g. The input data is not supported by the device for remote configuration.')
[2023-12-10 20:16:45.897][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/VideoIntercom/callSignal?format=json], input size[37], max segment length[262144]
[2023-12-10 20:16:50.571][DBG] Alarm chan [0] recv timeout[2]!
2023-12-10 20:16:56.434 | INFO     | mqtt:video_intercom_alarm:327 - Call dismissed, updating sensor 
settings: mqtt=MQTT(host='core-mosquitto', port=1883, username='addons', password='WohMitahLoolee0wiethohgh3aifeiziaveiNococeikoogiehietheph9eibaed', 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='home_front_gate', model='DS-KD8003-IME1/EU', manufacturer='Hikvision', sw_version='V2.2.62', hw_version='0x0', identifiers='6883457568564848514573776949476985484950485048485548578282695356495554505154', 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='home_front_gate_call_state', qos=None, unique_id='6883457568564848514573776949476985484950485048485548578282695356495554505154-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/home_front_gate/Call-state
config_topic: homeassistant/sensor/home_front_gate/Call-state/config
state_topic: hmd/sensor/home_front_gate/Call-state/state
wrote_configuration: True

The fact that the ringing does not stop is what bugs me. The rest is working.

hmm, should work , have you tried sending the reject command instead?

i also have error 29, when no active call is present, but it works when there is a real call

2023-12-10 19:25:24.987 | ERROR | mqtt_input:_answer_call_callback:357 - Error while answering call with ISAPI: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 29, 'Device operation failed.')

This is the reject without a running call:

2023-12-10 20:38:11.615 | INFO     | mqtt_input:_reject_call_callback:298 - Received reject command for doorbell: main_indoor_panel
2023-12-10 20:38:11.626 | ERROR    | mqtt_input:_reject_call_callback:311 - Error while rejecting the call with ISAPI: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 29, 'Device operation failed.')
[2023-12-10 20:38:11.626][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/VideoIntercom/callSignal?format=json], input size[37], max segment length[262144]

you need to test on real calls

This might be due to the way I have upgraded the units F/W.
Have you factory reset them when upgrading?
If this is the case where functions might not work with older versions leftovers.

OK.
A few minutes.

hmm, never done a factory reset on my indoor, i have 9310 and 9510 for indoor, and 8003 for outdoor, all latest firmware

Well the reject works so I will change the script.

ok, still strange that answer + hangup doesnt work, maybe not all devices do indeed support it, i have heard it before

Well I have the 8003 like you but it is a special Hebrew version and they might have created a bug. Anyway it works now so I am happy.
What I experience in terms of video is a bit strange. On my 2017 iPad which has a good WiFi reception, when moving to the intercom page, I see the video is running and pausing for a minute or so (I did not check exactly) but after a while it becomes black & pauses. I have to go back and forth to another page to make it run again. On my PCs, my iPhone 14, iPhone 15 and an old android (Android 9) it works smoothly. I did not run any bandwidth tests but I do not believe this is the issue.

Anyone has a working code for expanding the frigate-hass-card from within the card or from an automation?
Full screen lacks the control buttons.
I have tried few ways and non work.

++ answer + hangup does not function…:unsure
You know that I have 8003 just like you and 9510, and it is sporadic, for sure.
However, it does not work the majority of the time when you answer after someone rings: confused: …
How can we resolve it once and for all?

Check that you using HTTPS

Edit: After reading the documentation, seems that I need to put data for my internal unit and not the external one. We are 3 house with one external and 3 internal units. All connected by an hikvision switch.
Now,
the documentation says: if you are connected to Hikconnect, it will be the same. So I tried putting my internal unit ip, tried with admin/relatedPassword and with my hikconnect email/relatedPassword, but it doesn’t work. The error is device not online or timeout
But.
If I use the IP of external unit (it is connect to my wifi, since other 2 neighbors doesn’t have good wifi network) the error message change

Now the device seems online but username and password doesn’t work. This is because I’ve not installed this :poop: intercom by my self, and in this case the username/password are not known. I’ve just the password for the configuration of internal unit :sob: