WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

Ring-MQTT camera streams constantly live - stream never stops

Open btrudgill opened this issue 2 years ago • 9 comments

So I wanted to use WebRTC to improve the delay from the stream from my ring doorbell camera, which WebRTC does very well and gets it near instant, however, the livestream never turns off.

I have tried the intersection and background options, to ensure that when the card isn't in view that the stream stops but it never does. This leads to a new live stream event lasting 10 minutes in the Ring app. There is no apparent difference in behaviour for any combination of intersection and background options.

Using the picture entity card in combination with generic camera integration shows the expected behaviour of the livestream turning off 10 minutes after leaving the view of the card. WebRTC card seems to keep the stream active.

btrudgill avatar Nov 19 '23 21:11 btrudgill

So, an update: The stream sometimes stops correctly, but 1 in 5 times (ish) the stream will fail to close and the only way to stop the stream is to restart home assistant.

btrudgill avatar Nov 20 '23 15:11 btrudgill

It's very difficult to debug because I don't have those devices.

AlexxIT avatar Nov 21 '23 07:11 AlexxIT

I am seeing similar behavior. I have created a basic card with below config:

type: custom:webrtc-camera url: rtsp://123456-ring-mqtt:8554/123456_live title: Backyard Camera ui: true poster: >- https://ha.domain.com:8123{{ states.camera.backyard_snapshot.attributes.entity_picture }} muted: true

Setting ui: true removes the ring controls so you can't start a live stream ui: false results in the stream immediately starting when you browse to the card

robertr1229 avatar Mar 02 '24 16:03 robertr1229

Same for me except where @btrudgill says the stream successfully closes maybe 1 in 5 times, I don't seem to be that lucky. It feels more like never successful. My doorbell runs on battery and solar only, so as long as I have this integration active it just drains the battery until the doorbell is dead. I'd love to use the streaming function but have had to kill it for now.

dirkpauw avatar Mar 10 '24 17:03 dirkpauw

I noticed this behavior would stop if I stopped the RTSP to WebRTC add-on. So I pulled up the UI for this add-on, and found the stream for my Doorbell camera was set to persistent connection. I changed it to on-demand and my doorbell camera is no longer constantly streaming.

jdwannam avatar Apr 18 '24 04:04 jdwannam