Hikvision Doorbell / Videointercom integration

as said in the comment, the env file is used automatically in startup of of my distro (openmediavault)

My guess it’s not loading correctly, sorry don’t know openmediacault :frowning:

no problem, thanks for your help. I will search further. You may be right, i just got into the container and printed out the env variables: they really seem to be missing

1 Like

Hey @pergola.fabio How do I define the script for the delay?

I tried to define it in Automation and Scenes, and from there in Scripts:

alias: Answer + Hangup the call with a delay
sequence:
service: button.press
entity_id: button.primary_indoor_station_mainlevel_answer_call

  • delay:
    milliseconds: 500
    • service: button.press
      entity_id: button.primary_indoor_station_mainlevel_hangup_call
  • delay:
    milliseconds: 500
    mode: single

But when I call it via clicking the frigate card, he says service script.answer_call is not found.

I guess I’m doing something wrong. Can you tell me what I should do?

Hey look here, all example code is there…
No need for scenes/automations, only 1 script, and the rest is the card

Yes that what i’ve tried… to create one script -



type: custom:frigate-card
cameras:
  - camera_entity: camera.intercom
    live_provider: go2rtc
    go2rtc:
      modes:
        - webrtc
menu:
  style: outside
  position: bottom
  buttons:
    microphone:
      enabled: true
      type: toggle
    screenshot:
      enabled: false
    download:
      enabled: false
    fullscreen:
      enabled: false
    snapshots:
      enabled: false
    timeline:
      enabled: false
    media_player:
      enabled: false
    clips:
      enabled: false
    live:
      enabled: false
    cameras:
      enabled: false
    frigate:
      enabled: false
    camera_ui:
      enabled: false
live:
  auto_mute: never
  controls:
    builtin: true
    title:
      mode: none
  layout:
    fit: fill
elements:
  - type: custom:frigate-card-menu-icon
    icon: mdi:volume-high
    tap_action:
      - action: custom:frigate-card-action
        frigate_card_action: unmute
  - type: custom:frigate-card-menu-icon
    icon: mdi:volume-off
    tap_action:
      - action: custom:frigate-card-action
        frigate_card_action: mute
  - type: custom:frigate-card-menu-icon
    icon: mdi:phone
    tap_action:
      - action: call-service
        service: script.answer_call
      - action: custom:frigate-card-action
        frigate_card_action: unmute
      - action: custom:frigate-card-action
        frigate_card_action: microphone_unmute
  - type: custom:frigate-card-menu-icon
    icon: mdi:phone-hangup
    tap_action:
      - action: custom:frigate-card-action
        frigate_card_action: microphone_mute
  - type: custom:frigate-card-menu-icon
    icon: mdi:door-open
    entity: switch.primary_intercom_gate_entrance_1_door_relay_0
dimensions:
  aspect_ratio_mode: static
  aspect_ratio: '16:9'

must be something wrong then, maybe you dont have script loaded in your config file?

I need to set this in the configuration.yaml file?
wasnt mentioned, but anyway, even if i put that as follows:

something basic is missing here, if you asking me :slight_smile:
this is not the way for sure since it is not display in the developer tool under services… so i guess it supposed to be done differently

That’s indeed not right, you don’t have script integration loaded! Look in docs here:

1 Like

Works ! :slight_smile: just added it to the Scripts.yaml.

Thank you

1 Like

Hello everyone who knows what I did wrong
After installing the addon I had the following logs, but I have no movement
Is it ok ?

2024-02-24 00:30:09.477 | INFO     | event:motion_detection:98 - Motion detected from Doorbell
2024-02-24 00:30:09.477 | INFO     | mqtt:handle_device_trigger:456 - Invoking device trigger automation{'name': 'motion_detection', 'type': 'Motion detected', 'subtype': ''}
2024-02-24 00:30:21.029 | INFO     | event:motion_detection:98 - Motion detected from Doorbell
2024-02-24 00:30:21.029 | INFO     | mqtt:handle_device_trigger:456 - Invoking device trigger automation{'name': 'motion_detection', 'type': 'Motion detected', 'subtype': ''}
2024-02-24 00:30:34.015 | INFO     | event:motion_detection:98 - Motion detected from Doorbell
2024-02-24 00:30:34.016 | INFO     | mqtt:handle_device_trigger:456 - Invoking device trigger automation{'name': 'motion_detection', 'type': 'Motion detected', 'subtype': ''}
2024-02-24 00:30:47.641 | INFO     | event:motion_detection:98 - Motion detected from Doorbell
2024-02-24 00:30:47.641 | INFO     | mqtt:handle_device_trigger:456 - Invoking device trigger automation{'name': 'motion_detection', 'type': 'Motion detected', 'subtype': ''}
2024-02-24 00:31:02.209 | INFO     | event:motion_detection:98 - Motion detected from Doorbell
2024-02-24 00:31:02.209 | INFO     | mqtt:handle_device_trigger:456 - Invoking device trigger automation{'name': 'motion_detection', 'type': 'Motion detected', 'subtype': ''}
2024-02-24 00:31:15.786 | INFO     | event:motion_detection:98 - Motion detected from Doorbell
2024-02-24 00:31:15.787 | INFO     | mqtt:handle_device_trigger:456 - Invoking device trigger automation{'name': 'motion_detection', 'type': 'Motion detected', 'subtype': ''}

Yeah, that’s normal, is old data/backlog.
If yoi don’t need motion, you can turn it off on the device…

Hi :wave:

I’m wondering if the integration fully supports DS-KV8103-IME2.
I’ve installed it and it seems door relay is working, but call status is always idle.

Any ideas for next steps?

Thanks!

@pergola.fabio unforthenely the solution still sometimes works sometimes not .

state_topic: hmd/sensor/Primary-Intercom-Gate-Entrance-1/Call-state/state
wrote_configuration: True
        
2024-02-24 12:44:33.221 | INFO     | mqtt_input:_answer_call_callback:354 - Received answer command for doorbell: Primary Indoor Station MainLevel
2024-02-24 12:44:33.222 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: PUT /ISAPI/VideoIntercom/callSignal?format=json {"CallSignal": {"cmdType": "answer"}} 
2024-02-24 12:44:33.594 | DEBUG    | sdk.utils:call_ISAPI:165 - Response output: {
	"requestURL":	"/ISAPI/VideoIntercom/callSignal?format=json",
	"statusCode":	"1",
	"statusString":	"OK",
	"errorCode":	1
}
2024-02-24 12:44:33.724 | INFO     | mqtt_input:_hangup_call_callback:331 - Received hangup command for doorbell: Primary Indoor Station MainLevel
2024-02-24 12:44:33.724 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: PUT /ISAPI/VideoIntercom/callSignal?format=json {"CallSignal": {"cmdType": "hangUp"}} 
2024-02-24 12:44:34.104 | DEBUG    | sdk.utils:call_ISAPI:165 - Response output: {
	"requestURL":	"/ISAPI/VideoIntercom/callSignal?format=json",
	"statusCode":	"1",
	"statusString":	"OK",
	"errorCode":	1
}
2024-02-24 12:44:34.800 | DEBUG    | event:_handle_callback:220 - Callback invoked from SDK
2024-02-24 12:44:34.800 | DEBUG    | event:_invoke_handlers:192 - Invoking 2 handlers
2024-02-24 12:44:34.800 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from Primary Intercom Gate Entrance 1
2024-02-24 12:44:34.800 | INFO     | mqtt:video_intercom_alarm:377 - Call dismissed, updating sensor 
settings: mqtt=MQTT(host='core-mosquitto', port=1883, username='addons', password='uquahfeedaikahl0xeiwohyah8thou5eteng1omeeXifing6aekei3oiv0XaiSai', 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='Primary Intercom Gate Entrance 1', model='DS-KD8003-IME1', manufacturer='Hikvision', sw_version='V2.2.62', hw_version='0x0', identifiers='6883457568564848514573776949484950485049485149568282705457495653505654', 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='primary_intercom_gate_entrance_1_call_state', qos=None, unique_id='6883457568564848514573776949484950485049485149568282705457495653505654-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/Primary-Intercom-Gate-Entrance-1/Call-state
config_topic: homeassistant/sensor/Primary-Intercom-Gate-Entrance-1/Call-state/config
state_topic: hmd/sensor/Primary-Intercom-Gate-Entrance-1/Call-state/state
wrote_configuration: True
        
2024-02-24 12:44:38.210 | DEBUG    | mqtt_input:poll_scene_sensor:187 - Polling scene sensor every 15 sec
2024-02-24 12:44:38.210 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: GET /ISAPI/VideoIntercom/scene/nowMode  
2024-02-24 12:44:38.321 | DEBUG    | sdk.utils:call_ISAPI:165 - Response output: <SceneNowMode version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<nowMode>atHome</nowMode>
</SceneNowMode>

I hear the hang-up sound, but when I try to speak, no one can hear me.

Everything will be OK and I can talk and they will hear me if I respond before the they click to rings. ( so i know it works but something not alined yet.)
I have to say that this is a big issue that this hikvision can handle 2 stream in the same time ! bad design

However, when I answer the phone when it rings, it occasionally works and sometimes doesn’t. :confused:

Unfortunately, I can’t turn it off because the hcnetsdk.dll error occurs and I still don’t know how to solve it, motion detection logs go every 3 seconds constantly

UPD: I downgrade firmware and disable motion detect option but logs continue to arrive


Yeah ,it’s a known issue on frigate card, works only once, then you need to refresh the card, I have a ticket open for that

Yeah, that’s one of the devices not supported indeed, it’s an old one?

Just turn it off on your device with ivms or change the sensitivity

Yes, it’s a bit old. But I’m surprised some of the commands work. Do you have any tips for me to dig deeper?

Hmm, not really, you can try using the buttons callstatus/callerinfo, maybe the can poll the state?

1 Like