AlexxIT / WebRTC

Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies.
https://github.com/AlexxIT/Blog
MIT License
1.46k stars 173 forks source link

Ring-MQTT camera streams constantly live - stream never stops #607

Open btrudgill opened 10 months ago

btrudgill commented 10 months ago

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 commented 10 months ago

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.

AlexxIT commented 10 months ago

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

robertr1229 commented 7 months ago

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

dirkpauw commented 7 months ago

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.

jdwannam commented 5 months ago

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.

Drongo76 commented 2 weeks ago

Hello everyone. I have the same problem. Has anyone managed to find a solution?

manuelm23 commented 1 week ago

Hi, in mi case I had the check box for preloading ticked. In the generic camera setting. Hope it helps