Hikvision Doorbell / Videointercom integration

No, I don’t have any devices yet. The DS-K2M061 is not a network device. It is connected to the outdoor station(DS-KD8003) via RS-485 and can be installed indoors. I found this text in the user manual

If the door station receives a door opening command from an indoor station, this command is sent to the Secure module via the RS-485 bus instead.

So I hope that this just replaces a door relay, but I would be nice to know if it also works for the integration like this before I buy anything.

well, the problem is that is no ISAPI documentation for indoor devices… also port 80 is closed on them
Port 8000 is open for the SDK, thats being used by this addon, i can enable the trigger to send a remote open door to it, but i cant tell if it will work for you ?

i can send trough SDK , i tested it with my indoor station, but i receive:

Error while invoking ISAPI endpoint: ('Error while calling ISAPI /ISAPI/AccessControl/RemoteControl/door/1', 23, 'Device does not support this function.')

when sending:

PUT /ISAPI/AccessControl/RemoteControl/door/1 <RemoteControlDoor><cmd>open</cmd></RemoteControlDoor>

hey @j_d and @uros.76

DId some debugging on the hikconnect app, that was connected to indoor station
I was able to retrieve the commands being sended to open door and to trigger the IO relays

it works!

I will add them to the addon in next beta!

PUT /ISAPI/SecurityCP/control/outputs/0?format=json{"OutputsCtrl":{"switch":"open"}}
PUT /ISAPI/AccessControl/RemoteControl/door/1 <RemoteControlDoor><channelNo>1</channelNo><cmd>open</cmd><controlType>monitor</controlType></RemoteControlDoor>

POST /ISAPI/SecurityCP/status/outputStatus?format=json{"OutputCond":{"maxResults":2,"outputModuleNo":0,"searchID":"13e422c69dd94f579652216335efedef","searchResultPosition":0}}
1 Like

Awesome work man! Will test asap once available :wink:

yeah, gonna add 3 extra buttons to the indoor
2 for the relays, and 1 for opening door (if people have no access to outdoor station)

1 Like

@pergola.fabio You are a genius; it worked!
So what now?

On Steam, I see nothing.

I did configure the frigate.yaml with the following

cameras:
  salon:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/201/
          roles:
            - detect
  intercom:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/101/
          roles:
            - detect

go2rtc:
  streams:
    intercom:
      - rtsp://admin:[email protected]:554/Streaming/Channels/101/
#      - "ffmpeg:intercom#video=h264#audio=aac"
      - isapi://admin:[email protected]:80/
#    detect:
#      width: 1280
#      height: 720

did I configure something wrong?
following step 3 - the card was generated correctly, but it gives me like capture every second and not a real video - it supposed to be like this?
Generic cameras, on the other hand, do give me real video.

Thank you in advance.

For me it’s fluent… Do you have the frigate integration also installed? It creates an extra camera entity, you need to use that new camera entity in the frigate hass card

Yes, I did use the entity but I guess the reason I think it looks like snapshots :slight_smile: is because of the low FPS I get … (I think it is because of my old NUK that does not have GPU and only has 4 Core i3 CPUs. (Maybe it’s a bit too hard for him to process ?)

and as for the second question if I may ? The Go2RTC does not show me any links?

That’s strange, for me it shows the streams in the go2rtc webpage…

I found the reason!
for some reason, it did not like the line:

go2rtc:
  streams:
    intercom:
      - rtsp://admin:[email protected]:554/Streaming/Channels/101/

#      - isapi://admin:[email protected]:80/    <<<<<**-------------i comment out !**

    salon:
      - rtsp://admin:[email protected]:554/Streaming/Channels/201/

#      - isapi://admin:[email protected]:80/     <<<<<**-------------i comment out !**

Also … when I entered to the Frigate dashboard, I saw and option to set the type of stream - which was configured as jsmpeg, I changed it to webrtc, and now I can hear the voice, and the stream works flawlessly!

Moving step by step :wink:

Now, I can hear the voice in my computer right now! I tried to check if I could hear through my iPhone, but for some reason, i cant hear anything when i unmute :/… Not sure why

The same goes if I answer the call can hear and mic also not picked up?

Update

I can Hear flowless on my iPhone but the mic is not picked up. (is that related to the fact I comment-out the isapi ?)
When I answer, I know it is answering since the ringing in my house stops to ring when I click answer.
but I can only hear, not talk…

@pergola.fabio I just sent you a small gift :wink:

Thnx!!

Yes , Isapi is indeed needed to send audio, on the frigate card you should see an microphone button, you need to enable it on the hass card…

But you should also see the stream on the go2rtc page

Hello everyone!
I’ve been reading this thread for days, but I’m completely lost in the huge amount of information.
Please help me to clarify an important thing:

  • I have a DS-KV6113-PE1(C) intercom.
  • I don’t have an indoor unit! (I thought I could integrate it into the HA without it, using Go2RTC)
    Is it possible to get the bell button to work without an indoor unit?
    Do I really need the SIP for it?

Thanks a lot!

Ok i removed the comment i did for the isapi and now it using it since i see no issue and stream is visible.

But how can i know that it gives me video+audio+microphone… ?
When i click on “info” i get the following:

{
  "producers": [
    {
      "type": "RTSP active producer",
      "url": "rtsp://192.168.1.192:554/Streaming/Channels/101/",
      "remote_addr": "192.168.1.192:554",
      "user_agent": "go2rtc/1.6.2",
      "medias": [
        "video, recvonly, H264",
        "audio, recvonly, PCMU/8000"
      ],
      "receivers": [
        "96 H264, bytes=189607401, senders=1",
        "0 PCMU/8000, bytes=6538560, senders=0"
      ],
      "recv": 198190216
    },
    {
      "url": "isapi://admin:[email protected]:80/"
    }
  ],
  "consumers": [
    {
      "type": "RTSP passive consumer",
      "url": "rtsp://ccab4aaf-frigate:8554/intercom",
      "remote_addr": "172.30.32.1:48514",
      "user_agent": "Lavf59.27.100",
      "medias": [
        "video, sendonly, H264, H265",
        "audio, sendonly, MPEG4-GENERIC"
      ],
      "senders": [
        "96 H264, bytes=186832679, receivers=1"
      ],
      "send": 189101476
    }
  ]
}

When I click on config I see the following:

api:
  origin: '*'
log:
  format: text
rtsp:
  default_query: mp4                  <------ is that correct????
streams:
  intercom:
  - rtsp://admin:[email protected]:554/Streaming/Channels/101/
  - isapi://admin:[email protected]:80/
  salon:
  - rtsp://admin:[email protected]:554/Streaming/Channels/201/
webrtc:
  candidates:
  - 192.168.1.91:8555
  - stun:8555

Note that I use stun ! since it via zero trust :slight_smile:

Below, webrtc magic, click on “video , audio, microphone” en then share external link… That will make a test link to see if everything works… If it works, then you can use the frigate card

Hmm, not sure, you need somehow to intercept the call , you need Somekind of ringing state, then afterwards you can answer the call and start talking using two way sip… Can that device be configured without indoor?

@pergola.fabio it works - from the frigate card as following step 3. so when I click mic it indeed transfer 2 way audio :).

But in the iPhone via home assistant app or via browser (in iPhone)it is does not… and I use the same card?
any idea why?

update
I found out that in the iPhone under settings → home assistant
there is no microphone toggle :confused: not sure why. it might be the reason why I cant talk … but only hear?

By the way when i click on the answer call in MQTT I found out that I getting the following error:

Hikvision DoorBell Beta


2023-08-26 14:55:29.304 | INFO     | mqtt_input:_answer_call_callback:303 - Received answer command for doorbell: Primary Indoor Station MainLevel
2023-08-26 14:55:29.398 | ERROR    | mqtt_input:_answer_call_callback:315 - Error while answering call: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 29, 'Device operation failed.')

If relevant, what devices do I use:
image

When I hit answer is that sent to the indoor station or to the primary intercome?

You need to send answer to indoor station, but it only works when there is an actual ring, that’s why you see error 29, it’s normal :+)

Not sure, I don’t use iPhone :-). Maybe you can ask the question on GitHub for the hass card?

What donyou mean actual ring?can you elaborate?

I created automation that looks for trigger if it change to ring it send to
My speaker sound and a note to my iphone including capture :nerd_face: