2 Way audio Intercom for Reolink doorbell made easy

I did some testing this morning without an open gate script. I still don’t know what that is.
If I ring my doorbell I get the pop up on my phone as expected but I am not getting it on my wall mounted fire tablet that is running fully kiosk, even though both devices are registered in browser mod.
On my phone the pop up looks great with audio and video but when I press the green button to activate the two way communication I get a gray screen with a red error message telling me I have a configuration error.
What am I missing?
Thanks

I’m not sure spent about seven hours and is not working at all

Hello everyone, I have a problem, I added this doorbell via RTSP to go2rtc but it doesn’t appear in the entities, I don’t know why and I don’t know which one to add to blueprint because home assistant doesn’t find it, can someone help me, I don’t understand it, this is the first time something so complicated that I can’t do it

The registered stream in go2rtc will not show up as an entity in HA and it doesn’t need to.
If you read the guide, you have to select:

  1. in the first field the camera entity provided by the Reolink integration and
  2. in the second field just write the name of the stream defined in go2rtc. In your case your stream name already matches the default value so no need to modify it:

The open gate script is a script that you need to create that will perform the actions to open the door (or whatever you want). This script will run when you press the blue button.

About the popup not showing in your wall tablet, that is definetely a problem with browser mod and fully kiosk. Browser mod will create a new ID often if the browser fingerprint changes.

So I am an idiot.

If you get the “Configuration Error” message or when clicking the ‘call’ button for 2-way talking or when just adding a card to the dashboard for testing and you get this “Custom element doesn’t exist: webrtc-camera”, MAKE SURE YOU ADDED THE WEBRTC INTEGRATION!
I didnt because I didnt know I needed to. 2 days… 2 DAYS I was working on this!. I happened across this issue on the webrtc github: Custom element doesn't exist: webrtc-camera · Issue #260 · AlexxIT/WebRTC · GitHub
Someone mentioned my same issues. Then I remembered that I had to add go2rtc to get that working so I added webrtc and BINGO!

For context, I am a full stack dev so I know my way around code. But I only installed HA 3 days ago. Still learning.

Now I just have to work out why there is so much delay between saying something and hearing it on the doorbell.

Hi all,
thanks @victorigualada a lot for sharing this project and the blueprint.

If anyone suffered from the issues described above, here’s the updated version of the blueprint (tags and “new” way o closing popups added) which eliminates all of them:

blueprint:
  name: 2-way audio doorbell popupsv5
  description: Trigger a popup and perform actions when a visitor rings the doorbell with 2-way audio
  author: victorigualada
  domain: automation
  input:
    doorbell_sensor:
      name: Doorbell Sensor
      description: The binary sensor triggered when the doorbell is pressed.
      selector:
        entity:
          domain: binary_sensor
    browser_ids:
      name: Browser IDs
      description: List of Browser Mod IDs for displaying the popup.
      selector:
        device:
          multiple: true
          filter:
            - integration: browser_mod
    camera_entity:
      name: Camera Entity
      description: The camera to display in the popup. This should be the normal stream produced by the camera.
      selector:
        entity:
          domain: camera
    go2rtc_url:
      name: 2-way audio go2rtc stream
      description: The stream exposed by go2rtc that includes 2-way audio. This MUST match the stream name configured in go2rtc
      default: camera.2way_audio_doorbell
    open_gate_script:
      name: Open Gate Script
      description: The script to open the gate.
      default: null
      selector:
        entity:
          domain: script

trigger:
  - platform: state
    entity_id: !input doorbell_sensor
    from: "off"
    to: "on"

action:
  - service: browser_mod.popup
    data:
      tag: doorbell-popup
      size: normal
      browser_id: !input browser_ids
      style: |-
        ha-dialog {
          --mdc-dialog-min-width: 600px !important;
        }
        .content {
          width: auto !important;
        }
      content:
        type: picture-elements
        elements:
          # Pick-up button
          - type: icon
            style:
              left: 15%
              bottom: 0
              background-color: "#4CAF50"
              color: white
              padding: 14px
              font-size: 18px
              border: none
              border-radius: 50px
              display: inline-flex
              align-items: center
              cursor: pointer
              z-index: 1
            icon: mdi:phone
            tap_action:
              tag: anwser-popup
              action: call-service
              service: browser_mod.popup
              service_data:
                tag: doorbell-call
                size: wide
                dismissable: true
                style: |-
                  ha-dialog {
                    --mdc-dialog-min-width: 600px !important;
                  }
                  .content {
                    width: auto !important;
                  }
                browser_id: !input browser_ids
                sequence:
                  - service: browser_mod.close_popup
                  - service: browser_mod.delay
                    data:
                      delay: 1
                  - service: browser_mod.popup
                    data:
                      content:
                        type: picture-elements
                content:
                  type: picture-elements
                  card_mod:
                  style: |
                    #root { max-height: 436.65px }
                  elements:
                    - type: icon
                      icon: mdi:phone-off
                      tap_action:
                        action: call-service
                        service: browser_mod.close_popup
                        service_data:
                          tag: doorbell-call
                      style:
                        left: 85%
                        bottom: 0
                        width: 20px
                        background-color: "#f44336"
                        color: white
                        padding: 14px
                        font-size: 18px
                        border: none
                        border-radius: 50px
                        display: inline-flex
                        align-items: center
                        cursor: pointer
                        z-index: 1
                    - type: icon
                      icon: mdi:lock-open
                      tap_action:
                        action: call-service
                        service: script.turn_on
                        service_data:
                          entity_id: !input open_gate_script
                      style:
                        left: 15%
                        bottom: 0
                        background-color: "#2196F3"
                        color: white
                        padding: 14px
                        font-size: 18px
                        border: none
                        border-radius: 50px
                        display: inline-flex
                        align-items: center
                        cursor: pointer
                        z-index: 1
                    - type: custom:webrtc-camera
                      ui: true
                      url: !input go2rtc_url
                      media: video,audio,microphone
                      mode: webrtc
                      style:
                        position: absolute
                        top: 50%
                        left: 50%
                        width: 100%
                        height: 100%
                      card_mod:
                        style: |
                          .fullscreen {display: none}
                          .screenshot {display: none}
                          .pictureinpicture {display: none}
                          video {aspect-ratio: 16/9}
                  image: https://upload.wikimedia.org/wikipedia/commons/c/ca/1x1.png
          # Hang-up button
          - type: icon
            style:
              left: 85%
              bottom: 0
              width: 20px
              background-color: "#f44336"
              color: white
              padding: 14px
              font-size: 18px
              border: none
              border-radius: 50px
              display: inline-flex
              align-items: center
              cursor: pointer
              z-index: 1
            icon: mdi:phone-off
            tap_action:
              action: call-service
              service: browser_mod.close_popup
          # Open door button
          - type: icon
            style:
              left: 50%
              bottom: 0
              background-color: "#2196F3"
              color: white
              padding: 14px
              font-size: 18px
              border: none
              border-radius: 50px
              display: inline-flex
              align-items: center
              cursor: pointer
              z-index: 1
            icon: mdi:lock-open
            tap_action:
              action: call-service
              service: script.turn_on
              service_data:
                entity_id: !input open_gate_script
          # Camera stream
          - type: custom:more-info-card
            entity: !input camera_entity
            style:
              position: absolute
              top: 50%
              left: 50%
              width: 100%
              height: 100%
              z-index: 0
            card_mod:
              style: |
                :host { padding: 0}
                .card-header { display: none;}
                .card-content { padding: 0; margin-top: 0 }
        image: https://upload.wikimedia.org/wikipedia/commons/c/ca/1x1.png
        card_mod:
          style: |
            #root { height: 420px }

  - wait_template: >-
      {{ states('!input doorbell_sensor') == 'off' }}
    timeout: "60"
    continue_on_timeout: true

  - service: browser_mod.close_popup
    data:
        sequence:
          # ENSURE MORE-INFO IS CLOSED (modern >2.5.0 way)
          - service: browser_mod.more_info
            data:
              close: true
          # CLOSE MAIN POPUP
          - service: browser_mod.close_popup
            data:
              tag: doorbell-popup
              browser_id: !input browser_ids

mode: single
2 Likes

Hello everyone, I’m not sure if this topic has been covered here yet, but I’m having trouble executing this. Everything works fine—the image appears and I have two-way audio—but when I hang up using the red phone icon, the image disappears but the audio continues and won’t stop. I’ve already tried getting help from AI, but without success. Thanks to everyone!

Hey there,

Just starting this whole process too.

Isn’t go2rtc already bundled by default ??

I’ve come across this on other subjects but I wonder if this could work out of the box without installing the hacs go2rtc.

Regards

I have the preview :

When I click on answer button, no image displayed, but I hear the audio streaming :

Here is the go2rtc config, I have a reolink doorbell :

streams:
  camera.2way_audio_doorbell:
    - rtsp://admin:[email protected]:554/h264Preview_01_main
    - ffmpeg:camera.2way_audio_doorbell#audio=opus#audio=copy
log:
  format: text
  level: "debug"

api:
  listen: ":1984"
rtsp:
  listen: ":8554"
webrtc:
  listen: ":8555"

Any idea?

I had the same issue with the now famous configuration error, I fixed it by configuring properly the WebRTC integration which I happened to only install and forgot to finish configuring it (thank you @mychickenninja). Also if this is your case, remember to refresh your target browser where your mod browser is pointing to.

Also I wanted to point out that I’m running HA on a docker container (in a proxmox server) and I did not have networking issues. I installed go2rtc locally and seems to work well. By reading other comments it sounded like running HA on docker required additional configuration for this to work.

Thank you @victorigualada for making this and everyone for your precious inputs :slight_smile: