Hikvision Doorbell / Videointercom integration

I wish is just that. A bunch of events.
However since last night the state is still at “ringing”.

image

It’s on that state for almost 9 hours … Are you sure that I will be good ??? :slight_smile:

Maybe its time to restart the docker? :slight_smile:

What happens if you press the doorbell? Do you see the new event coming in? Maybe it will change to idle

After restart of docker it works as it should.
I will have an eye on it and get back to you.

thank you

@pergola.fabio, is something last I wanted to ask you

Someone at the door press the button.
From MQQT you can toggle door 1 relay which will unlock the door.
this is great!

The problem is that the indoor station keeps ringing aproximatelly for another 20-30 seconds.

I thought I could button.press the Hangup call but it doesn’t make any difference.
It keeps ringing at the indoor stations.

Is there anyway to stop it as soon as I unlock the door??
As it happens when you unlock from indoor station…Ring will stop after 1-2 seconds

Try the “reject” command … Hangup command only works, by first sending the “anwer”

The differenc:
Reject > rejects the call, give a reject tone at outdoor
Answer + hangup > is the same as above, but with no reject tone… (Useful to start two way audio talk)

unfortunatelly it doesn’t work
The docker gives an error at logs when press hangup or reject

config_topic: homeassistant/sensor/FrontGate/Call-state/config
state_topic: hmd/sensor/FrontGate/Call-state/state
wrote_configuration: True
        
2023-12-06 18:02:24.289 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from FrontGate
2023-12-06 18:02:56.216 | INFO     | mqtt_input:_hangup_call_callback:321 - Received hangup command for doorbell: FrontGate
2023-12-06 18:02:56.241 | 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-06 18:21:11.909 | INFO     | mqtt:video_intercom_alarm:324 - Doorbell ringing, updating sensor 
settings: mqtt=MQTT(host='192.168.70.240', port=1883, username='hikvision', password='123456', 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='FrontGate', model='DS-KD8003-IME2', manufacturer='Hikvision', sw_version='V2.2.45', hw_version='0x0', identifiers='6883457568564848514573776950484950484957485549578282505155505156495655', 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='frontgate_call_state', qos=None, unique_id='6883457568564848514573776950484950484957485549578282505155505156495655-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/FrontGate/Call-state
config_topic: homeassistant/sensor/FrontGate/Call-state/config
state_topic: hmd/sensor/FrontGate/Call-state/state
wrote_configuration: True
        
2023-12-06 18:21:11.909 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from FrontGate
2023-12-06 18:21:15.401 | INFO     | doorbell:unlock_door:146 -  Door 1 unlocked by SDK
2023-12-06 18:21:15.589 | INFO     | mqtt:update_door_entities:262 - Door 1 unlocked by 979899100 , updating sensor and device trigger
2023-12-06 18:21:15.590 | INFO     | event:video_intercom_event:109 - Video intercom event from FrontGate
2023-12-06 18:21:22.347 | INFO     | mqtt_input:_reject_call_callback:298 - Received reject command for doorbell: FrontGate
2023-12-06 18:21:22.403 | ERROR    | mqtt_input:_reject_call_callback:311 - Error while rejecting 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-06 18:21:24.802 | INFO     | mqtt_input:_reject_call_callback:298 - Received reject command for doorbell: FrontGate
2023-12-06 18:21:24.831 | ERROR    | mqtt_input:_reject_call_callback:311 - Error while rejecting 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-06 18:21:39.146 | INFO     | mqtt:video_intercom_alarm:327 - Call dismissed, updating sensor 
settings: mqtt=MQTT(host='192.168.70.240', port=1883, username='hikvision', password='123456', 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='FrontGate', model='DS-KD8003-IME2', manufacturer='Hikvision', sw_version='V2.2.45', hw_version='0x0', identifiers='6883457568564848514573776950484950484957485549578282505155505156495655', 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='frontgate_call_state', qos=None, unique_id='6883457568564848514573776950484950484957485549578282505155505156495655-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/FrontGate/Call-state
config_topic: homeassistant/sensor/FrontGate/Call-state/config
state_topic: hmd/sensor/FrontGate/Call-state/state
wrote_configuration: True
        
2023-12-06 18:21:39.147 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from FrontGate
2023-12-06 18:21:43.904 | INFO     | mqtt:video_intercom_alarm:324 - Doorbell ringing, updating sensor 
settings: mqtt=MQTT(host='192.168.70.240', port=1883, username='hikvision', password='123456', 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='FrontGate', model='DS-KD8003-IME2', manufacturer='Hikvision', sw_version='V2.2.45', hw_version='0x0', identifiers='6883457568564848514573776950484950484957485549578282505155505156495655', 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='frontgate_call_state', qos=None, unique_id='6883457568564848514573776950484950484957485549578282505155505156495655-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/FrontGate/Call-state
config_topic: homeassistant/sensor/FrontGate/Call-state/config
state_topic: hmd/sensor/FrontGate/Call-state/state
wrote_configuration: True
        
2023-12-06 18:21:43.904 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from FrontGate
2023-12-06 18:22:00.064 | INFO     | doorbell:unlock_door:146 -  Door 1 unlocked by SDK
2023-12-06 18:22:00.204 | INFO     | mqtt:update_door_entities:262 - Door 1 unlocked by 979899100 , updating sensor and device trigger
2023-12-06 18:22:00.205 | INFO     | event:video_intercom_event:109 - Video intercom event from FrontGate
2023-12-06 18:22:11.062 | INFO     | mqtt_input:_reject_call_callback:298 - Received reject command for doorbell: FrontGate
2023-12-06 18:22:11.102 | ERROR    | mqtt_input:_reject_call_callback:311 - Error while rejecting 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-06 18:22:12.585 | INFO     | mqtt_input:_reject_call_callback:298 - Received reject command for doorbell: FrontGate
2023-12-06 18:22:12.637 | ERROR    | mqtt_input:_reject_call_callback:311 - Error while rejecting 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-06 18:22:12.760 | INFO     | mqtt:update_door_entities:262 - Door 1 unlocked by 494848494849494848484900 , updating sensor and device trigger
2023-12-06 18:22:12.761 | INFO     | event:video_intercom_event:109 - Video intercom event from FrontGate
2023-12-06 18:22:20.310 | INFO     | mqtt:video_intercom_alarm:327 - Call dismissed, updating sensor 
settings: mqtt=MQTT(host='192.168.70.240', port=1883, username='hikvision', password='123456', 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='FrontGate', model='DS-KD8003-IME2', manufacturer='Hikvision', sw_version='V2.2.45', hw_version='0x0', identifiers='6883457568564848514573776950484950484957485549578282505155505156495655', 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='frontgate_call_state', qos=None, unique_id='6883457568564848514573776950484950484957485549578282505155505156495655-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/FrontGate/Call-state
config_topic: homeassistant/sensor/FrontGate/Call-state/config
state_topic: hmd/sensor/FrontGate/Call-state/state
wrote_configuration: True
        
2023-12-06 18:22:20.311 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from FrontGate
2023-12-06 18:23:38.876 | INFO     | mqtt:update_door_entities:262 - Door 1 unlocked by 494848494849494848484900 , updating sensor and device trigger
2023-12-06 18:23:38.877 | INFO     | event:video_intercom_event:109 - Video intercom event from FrontGate
2023-12-06 18:23:45.393 | INFO     | mqtt:video_intercom_alarm:327 - Call dismissed, updating sensor 
settings: mqtt=MQTT(host='192.168.70.240', port=1883, username='hikvision', password='123456', 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='FrontGate', model='DS-KD8003-IME2', manufacturer='Hikvision', sw_version='V2.2.45', hw_version='0x0', identifiers='6883457568564848514573776950484950484957485549578282505155505156495655', 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='frontgate_call_state', qos=None, unique_id='6883457568564848514573776950484950484957485549578282505155505156495655-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/FrontGate/Call-state
config_topic: homeassistant/sensor/FrontGate/Call-state/config
state_topic: hmd/sensor/FrontGate/Call-state/state
wrote_configuration: True
        
2023-12-06 18:23:45.394 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from FrontGate
2023-12-06 18:23:51.066 | INFO     | mqtt:update_door_entities:262 - Door 1 unlocked by 494848494849494848484900 , updating sensor and device trigger
2023-12-06 18:23:51.067 | INFO     | event:video_intercom_event:109 - Video intercom event from FrontGate
2023-12-06 18:23:57.591 | INFO     | mqtt:update_door_entities:262 - Door 1 unlocked by 494848494849494848484900 , updating sensor and device trigger
2023-12-06 18:23:57.593 | INFO     | event:video_intercom_event:109 - Video intercom event from FrontGate
2023-12-06 18:24:24.533 | INFO     | mqtt:video_intercom_alarm:324 - Doorbell ringing, updating sensor 
settings: mqtt=MQTT(host='192.168.70.240', port=1883, username='hikvision', password='123456', 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='FrontGate', model='DS-KD8003-IME2', manufacturer='Hikvision', sw_version='V2.2.45', hw_version='0x0', identifiers='6883457568564848514573776950484950484957485549578282505155505156495655', 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='frontgate_call_state', qos=None, unique_id='6883457568564848514573776950484950484957485549578282505155505156495655-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/FrontGate/Call-state
config_topic: homeassistant/sensor/FrontGate/Call-state/config
state_topic: hmd/sensor/FrontGate/Call-state/state
wrote_configuration: True
        
2023-12-06 18:24:24.534 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from FrontGate
2023-12-06 18:24:29.733 | INFO     | doorbell:unlock_door:146 -  Door 1 unlocked by SDK
2023-12-06 18:24:37.108 | INFO     | mqtt:update_door_entities:262 - Door 1 unlocked by 979899100 , updating sensor and device trigger
2023-12-06 18:24:37.114 | INFO     | event:video_intercom_event:109 - Video intercom event from FrontGate
2023-12-06 18:24:37.531 | INFO     | mqtt_input:_reject_call_callback:298 - Received reject command for doorbell: FrontGate
2023-12-06 18:24:37.566 | ERROR    | mqtt_input:_reject_call_callback:311 - Error while rejecting 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-06 18:24:42.007 | INFO     | mqtt_input:_reject_call_callback:298 - Received reject command for doorbell: FrontGate
2023-12-06 18:24:42.023 | ERROR    | mqtt_input:_reject_call_callback:311 - Error while rejecting 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-06 18:24:42.965 | INFO     | mqtt_input:_reject_call_callback:298 - Received reject command for doorbell: FrontGate
2023-12-06 18:24:43.009 | ERROR    | mqtt_input:_reject_call_callback:311 - Error while rejecting 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-06 18:24:46.383 | INFO     | mqtt_input:_answer_call_callback:344 - Received answer command for doorbell: FrontGate
2023-12-06 18:24:46.415 | 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-06 18:24:51.792 | INFO     | mqtt_input:_hangup_call_callback:321 - Received hangup command for doorbell: FrontGate
2023-12-06 18:24:51.815 | 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-06 18:24:55.665 | INFO     | mqtt_input:_hangup_call_callback:321 - Received hangup command for doorbell: FrontGate
2023-12-06 18:24:55.713 | 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-06 18:25:25.929 | INFO     | mqtt:video_intercom_alarm:327 - Call dismissed, updating sensor 
settings: mqtt=MQTT(host='192.168.70.240', port=1883, username='hikvision', password='123456', 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='FrontGate', model='DS-KD8003-IME2', manufacturer='Hikvision', sw_version='V2.2.45', hw_version='0x0', identifiers='6883457568564848514573776950484950484957485549578282505155505156495655', 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='frontgate_call_state', qos=None, unique_id='6883457568564848514573776950484950484957485549578282505155505156495655-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/FrontGate/Call-state
config_topic: homeassistant/sensor/FrontGate/Call-state/config
state_topic: hmd/sensor/FrontGate/Call-state/state
wrote_configuration: True
        
2023-12-06 18:25:25.930 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from FrontGate

yeah, that error 11 , means its not supported on your device, do you also have an indoor device connected? try add it to your addon config too, then send the reject command to indoor station

Man you are a star! Honestly
I’m not going to mention about the time and effort you have put on this project.
It’s exceptional!

But, even the response time is out of this planet and you don’t meet it every day.

so once more thank you!

I’ve added the indoor station under development.env and I’ve restarted docker but it seems the MQTT doesn’t show up anything else.

What am doing wrong?

Np! :slight_smile:

Normally it should show up, what does the log say? Do you see it configuring the multiple devices?
Show me your env file too

it does work.

here is what the MQTT says:

I will try your recommendation tomorrow and I will get back to you.
I believe that it will work.

Once more thank you!

1 Like

@pergola.fabio
because each time I have to run to the front gate to press the button to initial the call (for testing purposes), is it something I can do so I don’t have to run at the street every 5 minutes ??? Is there something to initiate the button press ?

No, I didn’t find a way , I believe I walked 1000 times for testing :slight_smile:

haha! I thought so!
Last night I was thinking exactly this. How many times have you walked back and forward for testing purposes … :slight_smile:

Anyway today is a bright day because your walk-through does work indeed!!
I unlock the door and then sent a reject button.press to indoor station!.
It does drop the call! Am very happy.

It seems that is stable too…
thanks!

enjoy it, spended indeed a lot of time on this one, since there was no integration at all!!

Fabio got something for me to help debug the reason the events are taking a while to show up in home assistant?

Hi, the events are stored on MQTT , check those? Maybe there is your delay to HA?

All events should be displayed in addon log, are they instant there?

I checked straight up on your HASS Addon logs, I timed around 10 to 15 seconds from pressing the doorbell button and the event showing up in the log

Hmm, maybe its a device issue? Have you tried rebooting it? Maybe new firmware?
If you open ivms, do you see instant traffic?

I never tried IVMS, how do I do that?

I have tried rebooting to no avail. I wanted to go back using restful sensor to poll the callStatus, but that http digest issue you mentioned before also affects me in this case. hass fails to do digest properly so it keep getting 401.

huh funny, seems like my doorbell just crashed, I think I forgot the rest sensor polling it maybe the excess 401 made it crash or maybe it is blocking my requests

Ivms 4200 is the management software to setup/install the device, you can configure the device with it, but also receive events, its based on same SDK