Can anyone help me please - I am struggling with the webrtc stream taking a long time to load - loading as MSE first, then after a few seconds switching to RTC.
I need to use the webrtc.create_link service in order to generate a link, which can be used when displaying my Reolink Doorbell as a popup via Pipup on my android tv.
- service: webrtc.create_link
data:
link_id: "{{ link_id }}"
entity: camera.front_doorbell_sub
The only way I can do this is to use the Reolink Integrations camera entity for the sub stream. This stream is awful and takes around 10 seconds or so to actually load, before stuttering and trying freezing. Elsewhere in Home Assistant, I use the go2rtc links to display the camera stream as RTC which works fine, although still takes a couple of seconds to load.
I can’t see any way of using a go2rtc RTC stream in the above script code, as it HAS to use an entity, and go2rtc doesn’t create entities, so I have to use this awful stream source.
Can anyone suggest a way around this? it currently takes 5 or 6 seconds of black screen then loads the MSE stream which displays a static picture for around 4 or 5 seconds, before switching to RTC where it starts displaying fine, but as my popup only stays on the screen for 30 seconds, I barely get any avctual use from it.
Full script:
alias: Display Doorbell PIP Popup on TV
mode: single
variables:
link_id: 0{% for _ in range(39) %}{{ range(10)|random }}{% endfor %}
sequence:
- service: webrtc.create_link
data:
link_id: "{{ link_id }}"
entity: camera.front_doorbell_sub #This comes form the Reolink Integration
open_limit: 1
time_to_live: 120
- service: rest_command.pipup_url_on_tv
data:
ip: 192.168.1.89
duration: 25
title: Front Door
message: Someone is at the front door
width: 640
height: 480
url: >-
https://myhomeassistanturl/webrtc/embed?url={{
link_id }}