Hikvision Doorbell / Videointercom integration

I just tested this and it works too. I guess I didn’t see this option because a restart was needed after updating the addon to latest versión. Actually, trigger is detected with almost no delay, so it is indeed a much better approach than using the “not close” trigger. :slight_smile:

CURRENT AUTOMATION

alias: "TEST: Doorbell RFID"
description: ""
trigger:
  - platform: device
    domain: mqtt
    device_id: 1c1711774ef4a66ee72191a14d4d72bd
    type: door open
    subtype: Control Source 979899100
    discovery_id: Doorbell_Beta door_open_1
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: switch.doorbell_beta_door_relay_0
            attribute: control source
            state: "[KEY BADGE 01]"
        sequence:
          - service: notify.mobile_app_sesars_iphone
            data:
              message: Puerta abierta por César
      - conditions:
          - condition: state
            entity_id: switch.doorbell_beta_door_relay_0
            attribute: control source
            state: "[KEY BADGE 02]"
        sequence:
          - service: notify.mobile_app_sesars_iphone
            data:
              message: Puerta abierta por Paloma
      - conditions:
          - condition: state
            entity_id: switch.doorbell_beta_door_relay_0
            attribute: control source
            state: "00"
        sequence:
          - service: notify.mobile_app_sesars_iphone
            data:
              message: Puerta abierta por HikApp
      - conditions:
          - condition: state
            entity_id: switch.doorbell_beta_door_relay_0
            attribute: control source
            state: "979899100"
        sequence:
          - service: notify.mobile_app_sesars_iphone
            data:
              message: Puerta abierta por STDIN
mode: single

For whatever reason, it didn’t work the first time I set it up, but it works with no issues after that. Perhaps the automation didn’t reload yet or whatever. I don’t think you have to worry, but I thought it was worth it to be mentioned.

Happy to continue the discussion there. Just wanted to give some further feedback to the questions raised in this thread.

You mentioned that I don’t need to use the stdin method anymore because I can use the switch thing in the beta version. However, I can’t see any tamper sensor in the beta version. I think it is the only item I can’t see there. Am I wrong? Just saying to know whether I can just stick to the beta version for the moment or I should keep both versions.

I am sorry but I am afraid it does not work as expected. The trigger works but it usually detects the previous badge used, not the actual one. It is the same behaviour thant the first tests i did. For the moment, the “not closed” option is more reliable even though it has some latency.

Cheers thanks

Hi, the tamper is also included, all those events are based on device triggers, like door_not_open …

We decided to step away from sensors, cause it was just too much, now every event is a device trigger

1 Like

ok, issue is open, we discuss the best options later

1 Like

Its strange it detects the previous badge? If you look in the addon log, do you see the correct badge there? So we can exclude sdk/device issue

You are right. The addon log reports the right badge ID. However, the automation reports the previous one.

Ok, let’s try @mion00 suggestion to invert the lines, first set attribute and then turn on the state…

Can you test that for us? I will remove the device trigger event

Hey , i added beta 24 , can you test? i removed the control source device trigger, and now set the attribute first before switch turn on

Changed the automation to the following and everything seems to work fine. Delay is minimal:

:slight_smile:

alias: "TEST: Doorbell RFID"
description: ""
trigger:
  - platform: device
    type: turned_on
    device_id: 1c1711774ef4a66ee72191a14d4d72bd
    entity_id: switch.doorbell_beta_door_relay_0
    domain: switch
    enabled: true
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: switch.doorbell_beta_door_relay_0
            attribute: control source
            state: "[Key Badge 01]"
        sequence:
          - service: notify.mobile_app_sesars_iphone
            data:
              message: Puerta abierta por César
      - conditions:
          - condition: state
            entity_id: switch.doorbell_beta_door_relay_0
            attribute: control source
            state: "[Key Badge 02]"
        sequence:
          - service: notify.mobile_app_sesars_iphone
            data:
              message: Puerta abierta por Paloma
      - conditions:
          - condition: state
            entity_id: switch.doorbell_beta_door_relay_0
            attribute: control source
            state: "00"
        sequence:
          - service: notify.mobile_app_sesars_iphone
            data:
              message: Puerta abierta por HikApp
      - conditions:
          - condition: state
            entity_id: switch.doorbell_beta_door_relay_0
            attribute: control source
            state: "979899100"
        sequence:
          - service: notify.mobile_app_sesars_iphone
            data:
              message: Puerta abierta por STDIN
mode: single

perfect, so solved then? :slight_smile:

Yup. It seems it is. Will give you further feedback if I realize about any unexpected glitch. Thank you so much!

1 Like

Good night. See what happens.
Zones are indeed visible in the log, but they are not added to the integration. Only the first triggered zone is added.


Yes, you are right, its because the type is the same, (magnetic) and its now grouped by it
I need to switch it, and make the zone number unique

I see @mion00 is busy on a refactor of it

@mion00 , is it better change:

trigger = DeviceTriggerMetadata(name=f"Zone alarm {zone_type}", type="alarm", subtype=f"zone_{zone_number+1}")

to this:

trigger = DeviceTriggerMetadata(name=f"Zone {zone_number+1}", type="alarm", subtype=f"alarm_{zone_type}")

thank you very much

I cannot find any instruction how to install it on the Docker (no addons in HA in Docker environment).

Hey, have a look here , it’s still in the dev section, since not released yet…

1 Like

Is the addon also able to record clips? Because I do own a “currently useless” KV 6113 because it can’t record and take snapshots. So far I understand HA can create the snapshot but how does it work with recording from that call? Can you also record/playback recordings? So how far can HA remove the use of the hikconnect app?

1 Like

No, recording/snapshot is not part of the addon, you can use the camera integration in HA for that

If you want to ditch hikconnect, you need to go the Sip road, with asterisk for example, there is also a Lovelace sip card for that

1 Like

ISAPI for callstatus works again on my 8003. Hikvision just sent new Firmware 2.2.62_230615 for KD8003-IME1. I can now get callstatus again from outdoor station like then in older firmwares.

1 Like