WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

Reconnect to stream after loss

Open popy2k14 opened this issue 6 months ago • 12 comments

Using go2rtc + webrtc camera in HA to display the door cam on an magic mirror on an HA dashboard. It's working fine most of teh time. I have done some work in HA the last days an restarted it several times. One time the stream did'nt survive (black screen with RTC in the right corner was shown) and i had to reload the page/dashboard, which i want to prevent.

After some tests: Restart go2rtc addon, HA core, ... the stream always survived.

Is there some sort of reload/reconnect implemented? (to be sure an stzream is always shown).

thx

popy2k14 avatar Jan 01 '24 15:01 popy2k14

I am also interested in this!

ccie11827 avatar Jan 19 '24 09:01 ccie11827

Now I am doing the following as a workaround to prevent this issue:

  • Send key F5 to chromium on magic mirror
  • Delay 4 seconds
  • power on the monitor

So the dashboard gets freshly loaded everytime someone enters the room and issue doesn't pop up.

To solve this i am thinking of something like: It checks every minute if it has a stream, when not, reload the stream

Is this possible?

popy2k14 avatar Jan 19 '24 15:01 popy2k14

@popy2k14 how do you send F5 to the browser?

sigalou avatar Jan 24 '24 12:01 sigalou

I also have flow losses after an hour and a half, I don't know why (it's since one of the last updates). I would like to be able to restart the flow if it gets stuck, like an F5 would do. THANKS

sigalou avatar Jan 24 '24 12:01 sigalou

@sigalou here is my complete setup incl. refresh after 4 seconds after turning on the monitor.

HA thread: https://community.home-assistant.io/t/replaced-magicmirror-with-lovelace-dashboard/600905/11?u=popy

But i think it should be solved in WebRTC/go2rtc.

popy2k14 avatar Jan 24 '24 18:01 popy2k14

What go2rtc version you using? v1.8.5 has a bug with reconnection feature

AlexxIT avatar Feb 17 '24 11:02 AlexxIT

Sure I have the HA addon go2rtc version 1.8.5.

Any hints when there will be an release so we can test if the issue is fixed for us?

popy2k14 avatar Feb 17 '24 11:02 popy2k14

Don't know about release. This problem fixed in the go2rtc latest master version

AlexxIT avatar Feb 17 '24 11:02 AlexxIT

Ok, thx

popy2k14 avatar Feb 17 '24 12:02 popy2k14

My problem seems to be fixed in the latest master version :-)

ccie11827 avatar Feb 23 '24 06:02 ccie11827

thx for the info. Would be nice if we can get an release, so everyone with supervised HA installations can benefit from the fix.

popy2k14 avatar Feb 23 '24 06:02 popy2k14

Tested the hardware master of go2rtc and also for me it seems stable for the last few days.

Any info when next stable will be released?

thx

popy2k14 avatar Mar 01 '24 16:03 popy2k14

https://github.com/AlexxIT/WebRTC/releases/tag/v3.5.2

AlexxIT avatar Apr 07 '24 14:04 AlexxIT

thx for the release (with downgraded go2rtc). Installed now and see how it goes.

Any hint's when a fixed version of go2rtc is realesed? https://github.com/AlexxIT/go2rtc/releases

popy2k14 avatar Apr 07 '24 14:04 popy2k14

When I'll have free time for this project. Made six releases in the last three days https://t.me/AlexxIT_Releases

AlexxIT avatar Apr 08 '24 08:04 AlexxIT

Wow, thx for your work. Take your time.

popy2k14 avatar Apr 08 '24 20:04 popy2k14