[Guide] HomeKit doorbell with Doorbird

Thought I’d write a guide for those struggling to get HomeKit doorbell working with their video doorbells.
I have a Doorbird doorbell which I added to HASS using the integration:

I created the template binary sensor that would be triggered when the doorbell button is pushed. This entity will be used in HomeKit for linked_doorbell_sensor.
— In my case, the Doorbird sends an event to HASS and is therefore defined as the trigger for the virtual button-press. If you already have a binary sensor entity created, skip this step and just define it in your homekit linked_doorbell_sensor.

template:
  - trigger:
      - platform: event
        event_type: doorbird_doorbird_Doorbell
    binary_sensor:
      - name: doorbell_sensor
        auto_off: 3
        state: "true"

The integration and template sensor provide the “doorbell” entities which I could add into a HomeKit bridge - Note the GUI method doesn’t yet support the Doorbell accessory configuration and hence it had to be done manually in yaml.

I created a homekit.yaml and linked it to my configuration.yaml file like so

homekit: !include homekit.yaml

homekit.yaml:

  - filter:
      include_entities:
        - camera.doorbird_live
    name: Doorbell
    entity_config:
      camera.doorbird_live:
        name: Doorbell
        linked_doorbell_sensor: binary_sensor.doorbell_sensor

Audio is not working, so it only serves to deliver a snapshot and notification for the doorbell event which will pop up on all iphones in the Home and also on Apple TVs. If you have audio working do let me know how you’ve done it.

Cheers!

4 Likes

Howdy Chris!

I’m struggling to add my Doorbird to Homekit via HA, i did everything as you’ve described, with no success. I’m pretty sure that my issue is related in „template” part, as i’ve never been using this functionality. Could you help me with this part? Cheers mate ! You are my only hope :slight_smile:

Hi @igbi12, gladly help where I can.

First things first, can you tell me which stage you’re at and paste the relevant configs sans credentials? Going by your message it seems you have a problem either with exposing the entity to HomeKit or have issues adding the accessory to HomeKit. Please walk me through until you hit the issue so I can better help.

Thanks!

Thank for this info! Hoping you can help, I’d like my hikvision smart events to show up on Apple TV and to do this I need my camera to show as a doorbell which led me to this page.

Can you help me with this?

Hello jonnystuart89, have you got your hikvision set up as a camera yet in home assistant?
If you do, just these 2 code snippets will get you settled

In configuration.yaml, do this

### This part is for your doorbell button to know it's been pressed, updating a binary sensor you will use as the doorbell sensor
template:
### Replace this trigger for a button press if that's your setup
  - trigger:
      - platform: event
        event_type: doorbird_doorbird_Doorbell
### Name your button here
    binary_sensor:
      - name: doorbell_button
        auto_off: 3
        state: "true"

### This manual HomeKit entry will create a bridge you add in the home app
homekit:
  - filter:
      include_entities:
        - camera.yourhikvisioncamera
    name: Doorbell
    entity_config:
      camera.doorbird_live:
        name: Doorbell
        linked_doorbell_sensor: binary_sensor.doorbell_button

Hope this helps?

Thanks!

I do have the hikvision set up as a camera then the event is set up as a binary sensor so that it shows as a sensor in HomeKit.

That’s great, in that case it’s just a matter of swapping the entities of your sensor and camera into the yaml config I posted. If you can’t get it working, do show me your configuration lines so that I know how to help you.

1 Like

This is my first stab at it but the doorbell isn’t showing in the Home app

### This part is for your doorbell button to know it's been pressed, updating a binary sensor you will use as the doorbell sensor
template:
### Replace this trigger for a button press if that's your setup
  - trigger:
      - platform: event
        event_type: binary_sensor.embedded_net_dvr_line_crossing_1
### Name your button here
    binary_sensor:
      - name: doorbell_motion
        auto_off: 3
        state: "true"

### This manual HomeKit entry will create a bridge you add in the home app
homekit:
  - filter:
      include_entities:
        - camera.camera_1
    name: Doorbell
    entity_config:
      camera.doorbird_live:
        name: Doorbell
        linked_doorbell_sensor: binary_sensor.doorbell_motion

Just a few things to go through, make sure you’ve:

Restart home assistant
Bottom left, hit notifications and you will see a QR code
Go to the home app and hit the + sign, add accessory and scan that QR code

Yep did all of that at the start, the device just wasn’t showing in home app even though the bridge was added

oh actually am I being dumb, does it show as a camera?

It does in fact, and the button is nested in the camera.

1 Like

Ah that would make sense! For some reason though it’s not showing any form of notification when the line crossing sensor is activated.

Looking at your code, the trigger might be incorrect in your case

template:
### Replace this trigger for a button press if that's your setup
  - trigger:
      - platform: event
        event_type: binary_sensor.embedded_net_dvr_line_crossing_1
### If you are triggering on a state change for binary sensor, then you should change the platform to state and the conditions to watch --- example below:
#platform: state
#entity_id: binary_sensor.motion_sensor_0112
#from: 'off'
#to: 'on'


### Name your button here
    binary_sensor:
      - name: doorbell_motion
        auto_off: 3
        state: "true"

But if you already have a binary sensor, there’s no need to create another one that is tagged onto the existing one. Just define it in homekit

homekit:
  - filter:
      include_entities:
        - camera.camera_1
    name: Doorbell
    entity_config:
      camera.camera_1:
        name: Doorbell
        linked_doorbell_sensor: binary_sensor.embedded_net_dvr_line_crossing_1

That’s done it! Thanks very much :slight_smile:

Just need to work out if I can change the notification text now, or change button press to motion

Sorted, I switched linked_doorbell_sensor for linked_motion_sensor

1 Like

I guess my only gripe is that there is a delay, I imagine that it’s down to the feed from the camera. My previous method of using binary_sensor.embedded_net_dvr_line_crossing_1 is pretty responsive

If I’m reading this right, you changed linked_doorbell_sensor as an entity config into linked_motion_sensor but kept the same entity, right?

linked_doorbell_sensor: binary_sensor.embedded_net_dvr_line_crossing_1

to

linked_motion_sensor: binary_sensor.embedded_net_dvr_line_crossing_1

I would imagine the response to be the same since your entity update frequency/sensitivity wouldn’t change here. It’s just a different class of notifications to homekit between doorbell and motion.

1 Like

Hi,

yes I Know I have no Doorbird but I hope someone can help me with the yaml.

I am very new to the topic, so please do not assume too much…

I have a doorbell with the following event:

’ “name”: “HmIP-DSD-PCB 0026D43998F872”
“param”: “PRESS_SHORT”
“channel”: 1’

Then I have a Netatmo Camera that gives me a jpg…

And now I want to have the bell, with picture in HomeKit…how does it work?

I can’t quite get along with yaml yet.

Will try my best @Blackei

First, please listen for the exact event by going to Developer Tools > Events
Type “*” and start listening

You would want to find the event type that is posted when your doorbell is rung, assuming you have already integrated it into HA.

Plug the event into the template binary sensor
template:
  - trigger:
      - platform: event
        event_type: ****yourdoorbellevent****
    binary_sensor:
      - name: doorbell_sensor
        auto_off: 3
        state: "true"

Next, create the homekit bridge/accessory

homekit:
  - filter:
      include_entities:
        - camera.yourneatamo
    name: Doorbell
    entity_config:
      camera.yourneatamo:
        name: Doorbell
        linked_doorbell_sensor: binary_sensor.doorbell_sensor