DS-KD8003 - DS-KV8113 - DS-KV8213 - DS-KV6113 - DS-KV8413 and .... integration Hikvision HikConnect Video intercom doorbell

ok will have look

Hi can you share that setup with the notification and action? I manged to get the expenology to run and works great thanks for the tip!

what setup?? in SS center, you just need to add the KV-8113 as a model, thats the only one available, but can work perfect for a 8003 (except call status)

No i meant the automation setup in HA.

i dont have any automation in HA for the synology

How do you do this?
" incoming call => i get HA push notiftcation coming from companion app, much faster then actually hikconnect is telling me that someone is at the door
in that notification , i have an action defined to decline call or answer
if i answer => the DS cam opens , and i can start talking, there is even a button to open a door!!"

ahh, o, not sure what you meant :slight_smile: , i do that with action notifications

like example :

  - service: !secret notify_ha_fabio
    data:
      title: "Deurbel"
      message: "Er staat iemand aan de deur!"
      data:
        channel: Deurbel
        clickAction: !secret camera_url # action when clicking main notification
        actions:
          - action:  door_open
            title: "Open Door!"        
          - action:  hikvision_reject
            title: "Hang up"          
          - action:  dscam_open
            title: "Open DS CAM" 
        image: !secret snapshot_buiten_deurbel_webhook
        priority: high
        ttl: 0

And below are my actions:

- alias: Action door open
  initial_state: 'on'
  trigger:
  - event_data:
      action: door_open
    event_type: mobile_app_notification_action
    platform: event
  action:
    service: script.open_door

- alias: Action Open DS CAM
  initial_state: 'on'
  trigger:
  - event_data:
      action: dscam_open
    event_type: mobile_app_notification_action
    platform: event
  action:
    service: script.open_dscam

- alias: Action Reject call
  initial_state: 'on'
  trigger:
  - event_data:
      action: hikvision_reject
    event_type: mobile_app_notification_action
    platform: event
  action:
    service: script.reject_hikvision

And in scrips i define my commands , for examle hang up call or open door isapi or open app , like example open hikconnect or dscam

open_dscam:
  sequence:
  - service: !secret notify_ha_fabio
    data:
      message: command_activity
      data:
        channel: com.hikvision.hikconnect
        tag: android.intent.action.MAIN
        intent_class_name: com.hikvision.hikconnect.login.LoadingActivity
        priority: high
        ttl: 0

GUYS, i have created an Add-on , easy to install, no need to change anything in code, all is based on config options :slight_smile: , its first addon ever :slight_smile:

Go to add-ons, add this as a custom repository : https://github.com/pergolafabio/Hikvision-SDK-Addon

Follow instructions, create 3 sensors manually in yaml and then change the options like ip/password/bearer in the addon-config

NOTE : only works in amd64 system , not raspberry!! sorry there is no lib from hikvision

You also see now the events in the log :slight_smile:

for now , 2 events ‘doorbell ringing’ & ‘door open’
Advantage, no polling anymore with ISAPI , also the door open event was not possible with ISAPI

I hope it works on other models too, must be …

2 Likes

Thanks for this @pergola.fabio - really appreciate it!

I’m running on amd64 with a Hikvision DS-KD8003-IME1 door station.

I’ve got the doorbell ringing and cleared status working. Not using the door unlocking but don’t see why it wouldn’t work if I added it later.

I’ve noticed that the RTSP stream to this device on home assistant seems to lag a bit, have you guys noticed the same? Therefore when I take a snapshot I usually miss the person.

No, no , indont have the lag… Are you polling the call sensor? Maybe you are polling every 3 seconds, and that’s why you are late maybe?

Guys, is it possible to add cameras based on IP in Hikconnect?
if i add my outdoor station to Hikconnect (ds-kd8003) , based on IP, i dont see an “open door” button

seems its only possible by adding the indoor station, based ok hikconnect cloud?

is there a way ?

@pergola.fabio Is it possible to hung up the ringing call as soon as you unlock the door??
The indoor station (monitor) has a call icon where you can answer call and / or hang up.
I just want to be able to hang up call as soon as I open the door. Is it possible something like this?

Yes, it’s possible, but not with ISAPi or sdk, you need the cloud command… I posted instructions earlier…

I have a zigbee door sensor placed on my door, as soon I open door manual or whatever, all ringing stops on indoor and smart device#!!! What a relief :+)

Edit: if you have 6113 device, I think ISAPi works, on my case 8003 it doesnt

excellent work with the Github repository.

I think that you can enable additional sensors with the following additions to your hik.py:

        if (alarminfo_alarm_v30.dwAlarmType == ALARMINFO_V30_ALARMTYPE_MOTION_DETECTION):
            print(f"Motion detected")
            # Motion sensor
            try:
                print("Sensor Motion Detected updating...")
                set_attribute(sensor_name, "Motion", "On")
                time.sleep(1)
                set_attribute(sensor_name, "Motion", "Off")
            except:
                print("Sensor updating failed")
        else:
            print(
                f"COMM_ALARM_V30, unhandled dwAlarmType: {alarminfo_alarm_v30.dwAlarmType}")

Yes indeed , you can customize it like you want… Should I include it in the addon already?

Any update on your two way audio?

SDK integration doesn’t support all event types for my doorbell DS-KB8112-IM, unfortunately.
I’m only receiving motion detected and door unlocked events, but not doorbell ringing.

Last option left is deploying a separate sip server at home, that’s a bummer.

You can also use the hikconnect cloud integration

i have add motion now:

1 Like

Excellent!.

I am working to add two way audio to scrypted’s hikvision plugin

2 Likes