Hikvision Doorbell / Videointercom integration

Ah, yeah, in my addon there are buttons, use the button answer then use button hangup…
Check addon log of the buttons actually work, they are not always supported on all hikvision devices

1 Like

I have implemented the Frigate with its custom card.
I get something a little different from the add example.

  1. The mic mute/unmute appear as one toggled button and not 2 buttons. I do not have a problem with that, but I do not understand why I do not get 2 buttons as in the image of the door camera.
    The same happens with the speaker button.
  2. I do not see the door unlock button at all. I have changed the entity_id to the one I use, and used the switch and also a script that is announcing door unlock etc.
    None of them show on the menu.

I have written a start guide here, maybe you can copy/paste it?

The first button below shows ONLY if you have a working two way audio setup with go2rtc , it needs tobe https and the ports needs to be open (or nginx)

image

How can i integrate this into scrypted and ultimately bring it to hksv?

I think Scrypted can use SIP? Or what do you want to integrate?
This addon we created can also work as standalone container, all entities are avaible in mqtt if thats an option for you ?

I just stoodup freepbx, test video calling between phone and ipad, seems to work, now need to figure out how to configure doorbell sip.
I am going to try it in scrypted once it all works locally.

In terms of pbx, is there a light version of some pbx solution? Seems an over kill to run pbx just for intercom

Yes, with Asterisk

Do you have any guide pn setting hikvision doorbell and scrypted plugin? What i am planning on potentially grouping rtsp stream with sip in to homekit so i can get live feed before k answer the call

I don’t know scripted, but my guess you can use camera entities like in HA that you can use for video?

Yeah that i can do, i am more interested in sip settings in the plugin, it uses URI, need to google i guess

The sip on hikvsion is just like any other sip device, just enter IP/port/… Very easy to setup

Thanks, ill play around with it

I’m trying to setup a standalone docker container following the guidance in https://github.com/pergolafabio/Hikvision-Addons/blob/a9094f7141ca734f64de2589944f8a4a77a13045/docs/docker.md

I have:

  • Created a new directory docker into which I have put:
  • File docker-compose.yml which is a copy of the example provided on github,
  • File development.env based on the example provided on github,modified for my Hikvions device and MQTT setup

Then I run docker-compose with the command line:

$ docker-compose up

The process fails with this error message:

Building doorbell unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/homeassistant/docker/Dockerfile: no such file or directory ERROR: Service 'doorbell' failed to build : Build failed

It looks like docker-compose is looking for a file called Dockerfile. I was expecting a build image to be downloaded from ghcr.io/pergolafabio/hikvision-doorbell:3.0.10, rather than an image being built.

Do I need a Dockerfile and if so what should it contain? Or is the image failing to download from ghrc.io?

Any fuidance would be appreciated!

No, the docker file is indeed not needed, the image is indeed already on ghcr , van you show me your files?

This is docker-compose.yml, copied from https://github.com/pergolafabio/Hikvision-Addons/blob/4dc90ad0441d4baa122a3d973152e258a23d4a15/docs/docker.md :

# docker-compose.yml
version: "3.8"

services:
  doorbell:
    image: ghcr.io/pergolafabio/hikvision-doorbell:3.0.10
    build:
      args:
        # Change this according to your architecture (so the correct native C libraries are used)
        - BUILD_ARCH=amd64
        # - BUILD_ARCH=aarch64
      context: .
    env_file:
      - development.env
    tty: true   # To read stdin commands

This is development.env copied and modified for my setup (passwords redacted):

# JSON string with the list of doorbells or indoor stations, for all options, have a look at the [docs](https://github.com/pergolafabio/Hikvision-Addons/blob/4dc90ad0441d4baa122a3d973152e258a23d4a15/doorbell/DOCS.md)
DOORBELLS=[{"name":"Frontdoor", "ip": "192.168.64.99", "username": "admin", "password": "xxxxxxxx"}]

# Connection to MQTT broker
MQTT__HOST=192.168.64.252
#MQTT__PORT=1883
MQTT__USERNAME=homeassistant
MQTT__PASSWORD=xxxxxxxx

# Help diagnose problems during development
SYSTEM__LOG_LEVEL=INFO
SYSTEM__SDK_LOG_LEVEL=NONE

# Load C native libraries required by the Hikvision SDK. Use the correct folder depending on you architecture.
LD_LIBRARY_PATH=lib-amd64/

# Enable python module to get stacktraces from C native calls in the SDK
PYTHONFAULTHANDLER=true

Yeah , that should work, not sure why it’s asking for the dockerfile…
If you want to manually build , you can find the dockerfile in the “dev” branch

According to the docker-compose.yml documentation at https://docs.docker.com/compose/compose-file/build/:

When a `build` subsection is present for a service, Compose ignores the `image` attribute for the corresponding service, as Compose can build an image from source.*

It looks like the example docker-compose.yml will never download the image and will always attempt to build an image. It will then not find Dockerfile and fail.

ah, maybe drop the build section and point directly to the correct image for amd64 or aarch64 ?

I have loaded the add on and I can see the events going through the logs so at one level it seems to be working .

The MQTT Screen shows the controls but most are greyed out - so i cant for example release the door lock.

My next challenge is i can only find an entity for Hikvision Doorbell Update - so I have no idea how to for example to monitor for the door bell being pressed and then to release the door.

As such either there ie something wrong with my set up ( can release door ) or I dont know how to use it - or both!

Could someone please help?

Thank you

I tried to paste the logs but got an unformatted code erro