Hikvision Doorbell / Videointercom integration

Note:
In order to be able to utilize the microphone on iOS, you must connect via HTTPS, including the Home Assistant app; otherwise, it will not work.
@pergola.fabio :slight_smile: I know you said that already, but I never thought to change that on the app-specific.

@pergola.Fabio, if I may, from the Frigate dashboard, I get the sound from all my cameras, but when I put them in the card, the volume is grayed out.
Do I need to configure something on the card, maybe? ( in the intercom all works, unlike the cameras that sound is heated only from Frigate dashboard)

Yeah, you can configure volume on the card, I added some buttons to unmute and mute… Have a look at the frigate card on GitHub for all options, I just created very fast, don’t use it myself, it was just a guideline

Something is acting strangely, when I enter the HA and select Answer Call on the intercom card, the microphone and speaker become unmuted, and after a brief delay, the video updates so that I can speak and everyone can hear me.

But when I receive a call and answer it the same way, the indoor ringing stops (as expected), the microphone is unmuted, I speak, and the video refreshes (as expected), but he still cannot hear me.
To work around it i had to answer all again … (feels like the incoming call might be interfering for some other reason or something else?)

Regarding the Audio for the Cameras, I only used Step 3 for the Intercome since the Camera only has 1way audio and no microphone, so I just added the frigate card and only chose the frigate cameras for that. (I suppose I need to configure something else in order for the sound to function)

Remember, if the outdoor speaker is in use (ringing) you can’t use two way audio, that’s why I do an answer first… makes the outdoor speaker stop making the ring sounds, then the audio out works

@pergola.fabio I’m utilizing your card :slight_smile: .I think what you explain is the exact same thing i described, But when I receive a call and answer it the same way (via your card calling to (entity button.primary_indoor_station_mainlevel_answer_call) , he indoor ringing stops (as expected), he microphone and speaker are unmuted, the video refreshed - and they can’t hear me. (Mic is on)

But if I close the HA and I will enter it again (like refresh), go to the card and click on answer a call without hitting the call button from the intercom - it will works as expected 2way audio will be transferred

The only change here is the entity for internal indoor to answer call
and entity to open the gate

type: custom:frigate-card
cameras:
  - camera_entity: camera.intercom
    live_provider: go2rtc
    go2rtc:
      modes:
        - webrtc
menu:
  style: outside
  position: bottom
  buttons:
    microphone:
      enabled: true
      type: toggle
    screenshot:
      enabled: false
    download:
      enabled: false
    fullscreen:
      enabled: false
    snapshots:
      enabled: false
    timeline:
      enabled: false
    media_player:
      enabled: false
    clips:
      enabled: false
    live:
      enabled: false
    cameras:
      enabled: false
    frigate:
      enabled: false
    camera_ui:
      enabled: false
live:
  auto_mute: never
  controls:
    builtin: true
    title:
      mode: none
  layout:
    fit: fill
elements:
  - type: custom:frigate-card-menu-icon
    icon: mdi:volume-high
    tap_action:
      - action: custom:frigate-card-action
        frigate_card_action: unmute
  - type: custom:frigate-card-menu-icon
    icon: mdi:volume-off
    tap_action:
      - action: custom:frigate-card-action
        frigate_card_action: mute
  - type: custom:frigate-card-menu-icon
    icon: mdi:phone
    tap_action:
      - action: call-service
        service: button.press
        service_data:
          entity_id: button.primary_indoor_station_mainlevel_answer_call
      - action: custom:frigate-card-action
        frigate_card_action: unmute
      - action: custom:frigate-card-action
        frigate_card_action: microphone_unmute
  - type: custom:frigate-card-menu-icon
    icon: mdi:phone-hangup
    tap_action:
      - action: custom:frigate-card-action
        frigate_card_action: microphone_mute
  - type: custom:frigate-card-menu-icon
    icon: mdi:door-open
    entity: switch.primary_intercom_gate_entrance_1_door_relay_0
dimensions:
  aspect_ratio_mode: static
  aspect_ratio: '16:9'

1 Like

So the problem is on a real call, that the Audio on card doesn’t work?
I indeed send an answer command, maybe the mic on outdoor is indeed still in use… Maybe try do a hangup command immediately after the answer command?

Or try with the reject command instead?

@pergola.fabio i don’t see in your yaml Hangup entity … when I hit the “hangup” it just mute the microphone. (at list, that’s what I can see) and still, when i talk on the phone the intercom does not reflect it.

only if i take down the app turn it back and click answer then all works.

seems like something needs to be changed in your YAML card.?

Yes indeed , you need to add the hangup command after the answer command, as I told before , I don’t use the card, it’s just a guideline :+)

You need Todo some trial and error to find the perfect solution :slight_smile:

So, I just checked it with 3.0.2 and it works!
When I press the caller info, I can see in the logs which outdoor device called (I have two outdoor and five indoors in my setup). Now I need to setup some kind of automation in HA, so that when the outdoor is ringing, press the caller info at all indoors and for the one I don’t get an error (meaning that the specific indoor is ringing), to read the devNo value to understand which outdoor was used, and run any actions I need.
I need to some digging to make this automation in an efficient manner, but it should work.
Thanks!!!
Your coffee tomorrow is on me! :slight_smile:

If you ever find time, it would be useful to somehow integrate this polling of the indoor units functionality in the add-on, so the called indoor would be an attribute of the outdoor unit. Let’s hope that Hikvision enriches its SDK, so the called indoor number would be readily available without any need for checking all indoors…

Thnx! I need to investigate further if there is indeed a relationship between indoor and outdoor, but I think the caller info on outdoor is always the same…

I think the best approach is that when caller info is enabled in the config, on incoming call, also poll the caller info on indoor… So no need for an extra automation

I don’t have an outdoor with 2 buttons , so I’m limited… Do you see actually a difference in output when you send the callerinfo to outdoor? When pressing button 1 vs 2 for example?

hi pergola.fabio

after update to 3.0.2 i got this

2023-09-04 09:05:27.496 | INFO     | sdk.utils:loadSDK:44 - Using OS: Linux with architecture: x86_64
loop[2] find 2 mac and 0 ip
2023-09-04 09:05:27.880 | INFO     | doorbell:authenticate:71 - Connected to doorbell: women door
2023-09-04 09:05:27.921 | INFO     | doorbell:authenticate:71 - Connected to doorbell: man door
2023-09-04 09:05:27.942 | INFO     | doorbell:authenticate:71 - Connected to doorbell: Indoor
2023-09-04 09:05:27.966 | INFO     | doorbell:authenticate:71 - Connected to doorbell: Indoor Extension
2023-09-04 09:05:27.967 | INFO     | event:__init__:76 - Setting up event handler: Console stdout
2023-09-04 09:05:27.968 | INFO     | mqtt:__init__:96 - Setting up event handler: MQTT
2023-09-04 09:05:28.737 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:05:28.750 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:05:43.763 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:05:43.776 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:05:58.792 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:05:58.811 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:06:13.818 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:06:13.833 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:06:28.853 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:06:28.870 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:06:43.878 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:06:43.893 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:06:58.906 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:06:58.922 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:07:13.929 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:07:13.943 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:07:28.959 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:07:28.972 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:07:43.982 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:07:43.998 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:07:59.012 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:07:59.033 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm
2023-09-04 09:08:14.042 | INFO     | mqtt_input:poll_scene_sensor:147 - Scene sensor changed to atHome
2023-09-04 09:08:14.054 | INFO     | mqtt_input:poll_alarm_sensor:182 - Alarm sensor changed to closeAlarm

Yes, that’s the scene/alarm feature coming from your indoor , it polls every xx seconds… If you are not interested in those scenes , you can disable it in your config, probably you enabled it?

1 Like

yes , i just disable it , but after update ther all button invisable and i cant press it

" 2023-09-04 09:05:27.496 | INFO | sdk.utils:loadSDK:44 - Using OS: Linux with architecture: x86_64
loop[2] find 2 mac and 0 ip "

this is normal ?

Yes, that’s normal… Scenes is indeed an optional feature, since it’s based on polling what I don’t like :+)

So it’s only enabled if you really want that feature

2 Likes

Hi everyone.
I have to buy a videointercom.
Which Hikvision with 2 files and an internal wifi station is more convenient with this home assistant software?
Thanks in advantage

If you don’t buy the hardware yet, there are better intercoms available with better integrations, like dahua, Doorbird…

Unfortunately, there’s no difference. No matter which button I press, I always get the same output from the outdoor callerinfo.

Seems that the polling of the indoor units is the only way at the moment. Hikvision should definitely add this capability to the SDK!

Maybe there is, but then I need to find it :+)

But you are right, it should be visible in the ringing event itself…

I already checkedout Doorbird and the integration seems pretty easy, but they are more expensive and I like the modular style of Hikvision Pro, but depending on my budget I might switch to Doorbird :slight_smile:

I didn’t find much about Dahua. There seem to be two integrations: Elad Bar / DahuaVTO2MQTT · GitLab and GitHub - myhomeiot/DahuaVTO: Control Dahua VTO/VTH devices from Home Assistant, but both didn’t get any updates for more than a year.

no updates, means its stable :slight_smile:
Well, hikvision works, but dont expect good calling from HA

  • SIP works, but if yoiu have indoor stations => you loose early video on the indoor stations, you dont see who calls, untill you answer

  • TwoWayAudio (frigate card) works , but you need to reject the call first (beep beep sound) for visitors

If you dont want calling from HA companion, then Hikvision is “ok”

1 Like