Hi, Thanks to @victorigualada and all the comments above I have managed to get this set up. There are a few problems I have not been able to solve…
The first popup to appear (camera feed without audio) has a header “Front Door Fluent” which I have not been able to remove.
There is a 3-7 second delay between answering on the first popup and the second popup with audio appearing.
The auto response button does not work. - I did manage to get one of the pregenerated reolink auto responses to play by taking control and editing the yaml, but ideally I would be able to programme my own responses.
The audio continues feeding from the doorbell to the tablet after the popup is closed. I can see this was mentioned in some of the more recent comments from @Linux85 and @dcapslock and others but I count not tell if there was a solution to this.
If anyone can help me out with any of the above it would be greatly appreciated, I am still fairly new to HA and have been trying to use LLMs to help me at points but as mentioned in the comments above they are not great at this. Thanks again.
Background: Recently I have addressed a similar issue with the standard more-info dialog and how it is closed with Browser Mod. There is now (beta) a close option in browser_mod.more_info to close the dialog rather directly rather than relying on empty entity, which mitigates this issue for more-info.
I believe there are similar issues here. It has to do with the way the Home Assistant dialog manager manages reusing the same dialog element in that to make sure its on top it reappends the element, which means a disconnect and reconnect to the DOM. This then can cause wierd issues like audio stream staying connected.
To verify this, I would expect that if you don’t ‘answer’ then there would be no audio issue after ‘hangup’ on teh first popup. It is only when you ‘answer’, and the popup is ‘reused’, that there will be an issue.
The workaround should be to use a Browser Mod sequence to close the popup before opening the new popup. So L76 of Blueprint Gist you would use a sequence, something like…
tap_action:
action: call-service
service: browser_mod.sequence
service_data:
browser_id: !input browser_ids
sequence:
- service: browser_mod.close_popup
- service: browser_mod.delay # May not be needed, but might assist to allow any closure tasks to complete
data:
delay: 1 # ms
- service: browser_mod.popup # can leave out browser_id here as the sequence has targetted the browser(s)
data:
content:
type: picture-elements
# etc...
If I may, I will leave to others to test and update as I don’t have a device, but happy to provide support.
I may likely have done this wrong but this didn’t work for me.
Taking control of a fresh blueprint dosen’t give me the same layout as the Blueprint Gist link. As best I could tell the “tap action” line referenced here was on line 39, I inserted the following under my browser id on line 55:
Apologies again for missing something obvious, I started again from a fresh blueprint, input the changed code and noticed that the indents did not match. I’m not sure what the correct way to resolve this would be. Would I move everything below across 6 spaces to match up?
sequence:
- service: browser_mod.close_popup
- service: browser_mod.delay # May not be needed, but might assist to allow any closure tasks to complete
data:
delay: 1 # ms
- service: browser_mod.popup # can leave out browser_id here as the sequence has targetted the browser(s)
data:
content:
type: picture-elements
content:
type: picture-elements
card_mod: null
style: |
I included the doubled lines in the example because I wasn’t sure what to remove.
Originally I only added new code, without changing any indents.
I’ve tried moving the indents out by 6 spaces to various points below to match up but I still can’t get it to work. It wouldn’t save if I moved the entire code and if I moved the indents up to the end of a section of code it might let me save but the second popup wouldn’t open.
I’m really not experienced with this to know where I might be going wrong here, hopefully someone else will have better results.
Thanks to @dcapslock the continuing audio problem has beens resolved. I don’t want to give confusing instuctions so hopefully he won’t mind explaining the fix.
I’m still hoping to find a solution to these other problems if possible;
The first popup to appear (camera feed without audio) has a header “Front Door Fluent” which I have not been able to remove.
There is a 3-7 second delay between answering on the first popup and the second popup with audio appearing.
The auto response button does not work. - I did manage to get one of the pregenerated reolink auto responses to play by taking control and editing the yaml, but ideally I would be able to programme my own responses.
so I managed to edit the blueprint and import it again, unfortunately I’m still having the audio issue after hanging up, I can still here the sound from the doorbell.
how did you solve it ? was adding the sequence enough ?
here is the blueprint
blueprint:
name: 2-way audio doorbell popups
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:
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:
action: call-service
service: browser_mod.popup
service_data:
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
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:
browser_id: !input browser_ids
mode: single
I noticed tho that the after finishing the call, the first popup is still there, but closes up after few seconds, I don’t know if it has something to do with the browser_mod.delay we added, i tried to tweak it and remove it, it didn’t fix it, and the popup doesn’t close at all. so i put it back.
You may also try the original code with the addition of tag for second popup and forgo the sequence. It may work as well and to fix the audio lingering.
Doest this mean you are using rtmp with default port 1935 and rtsp with default port 554 ? So i guess if i use onvif also for unifi protect therfore i have to have rtmp, rtsp, onvif, https am i right?
basic port 9000 - related to reolink app is no longer need if this will work properly - i can be turned off by switching off “enable uid” in doorbell camera settings WebGUI right?
Sub question - theres added app:bcs and later bcs stream channel and morevoer it is thru https connection or rtmp ?
I also get error message (in my conf i changed dourbel to vf) on first stream:
[rtsp] error=streams: exec/rtsp
[AVFormatContext @ 0x7fd568d76d40] Unable to choose an output format for ‘myvol’; use a standard extension for the filename or specify the format manually.
[out#0 @ 0x7fd562deb4c0] Error initializing the muxer for myvol: Invalid argument
Error opening output file myvol.
Error opening output files: Invalid argument
stream=vf
After removing:
#audio=myvol
From command it shows stream inside go2rtc, is it needed for tablet itself (and should go error on HAOS pc WebGUI) ?
Second stream vf_2way doesn’t show any error while its conf is related to vf stream like this (set to local IP also):
About general Fully Kiosk settings - did you set as main “go to url” cloudflare https URL or local URL ??
In case as you set default Fullly Kiosk Home page can you tell wont it suffer for transfering whole connection thru local - > internet server to domain related - >local back and then with answer local → again internet server to domain related → local again ??
in Advance Camera Card:
camera_entity: camera.deurbel
Does it calls to original camera entitiy (if so there are two of them high res and low res resoluton (provided from Reolink Integration) or it calls to go2rtc entity ? If so i guess in my situation it should be camera.vf am i right? but there is no such entity - i mean go2rtc doesn’t provide entity.
thanks for reply - really hope that @MaximVB86 will respond with some solution. I tried to described every “corner” of issue. Do you use Fully Kiosk ? If yes did you managed any other away for doorbell ?
EDIT:
I think to get it work propably it is needed to install HAOS Addon WebRTC and propably create generic camera somehow on top of that.
go2rtc:
streams:
# example for connecting to a standard Reolink camera
your_reolink_camera:
- "ffmpeg:http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password#video=copy#audio=copy#audio=opus"
your_reolink_camera_sub:
- "ffmpeg:http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=username&password=password"
# example for connectin to a Reolink camera that supports two way talk
your_reolink_camera_twt:
- "ffmpeg:http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=username&password=password#video=copy#audio=copy#audio=opus"
- "rtsp://username:password@reolink_ip/Preview_01_sub
your_reolink_camera_twt_sub:
- "ffmpeg:http://reolink_ip/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=username&password=password"
- "rtsp://username:password@reolink_ip/Preview_01_sub
# example for connecting to a Reolink NVR
your_reolink_camera_via_nvr:
- "ffmpeg:http://reolink_nvr_ip/flv?port=1935&app=bcs&stream=channel3_main.bcs&user=username&password=password" # channel numbers are 0-15
- "ffmpeg:your_reolink_camera_via_nvr#audio=aac"
your_reolink_camera_via_nvr_sub:
- "ffmpeg:http://reolink_nvr_ip/flv?port=1935&app=bcs&stream=channel3_ext.bcs&user=username&password=password"
Data about reolink for further analysis…
Changing Reolink integration low resolution feed name into camera.deurbel couses Could not get camera endpoint for this live provider (incomplete configuration?) .
Can someone help me out how to create entity (i guess Generic Camera Integration) based on go2rtc Core HA Integration ?