Add on: RTSPtoWeb and RTSPtoWebRTC

As far as some Unifi devices not working with the RTSPtoWeb -WebRTC

I found this comment in another thread about the rtsps not working. evidently, the rtsp still works.

One thing that is interesting is that my G4 dome works perfectly on the rtsps, but not the G3 dome.

Had the same issue. This is a Unifi related problem. You can access the rtsp stream on Unifi Protect to get restreamer to work:
Change the protocol to rtsp, change the port to 7447 and cut off everything behind the “?”. So, if in Protect the following URL is shown: rtsps://10.0.100.4:7441/M3oBdx0AmMnk54pq?enableSrtp
just enter rtsp://10.0.100.4:7447/M3oBdx0AmMnk54pq in restreamer. Works fine for me.

Which is the recommended version?

Check out the first post in this thread

My setup is that I can view HA remotely using cloudflared argo tunnel. It is working when viewing the cctv in the same network but NOT working outside network when using my iPhone.

For some reason, port 8083 would not work for me. I set RTSPtoWEB to use port 8082 and it works, BUT when I click open WebUi it directs me to port 8083. I can manually change the port in the browser and the dashboard opens.
How can I fix that?

Unfortunately you have to make the URL yourself if you change the port. The idea is you don’t really need to use the web ui very much… home assistant exposes webrtc via the stream card.

Did you figure this out?

Stopped using it

This may be something that has been covered before but I’m looking at adding this to my setup to add a low latency full quality camera stream to a number of tablets around my house that currently display awful mjpeg copies of a sub stream

I have everything working when on a web browser and my setup is using the separate RTSPtoWeb docker image

So my first issue is if I load the same page that works on desktop on any device running the home assistant app (via wifi, the connection is fine), the videos never loads even with the app set to auto play video, are apps supported by this or is it something more tuned towards web only?

Also, from a stream perspective, how many connections does the RTSPtoWeb system make to the actual camera? Mine is limited to 2 main streams at any time but as its running through this system, i’d assume each client connected would see the same stream rather than 2 views doing 2 seperate connections to the cameras, is that assumption correct or would I be looking at 1 connection to the camera per device pulling the stream?

I would suggest sticking with the zlL HLS feeds given your setup. You’ll be much happier and it will work much more robustly, especially given the limitations around limited connections and number of viewers.

Thanks for the integration and add on @allenporter , do you have to a todo list for (custom or core) integration owners to support this?

Hi, you’re welcome. I’m not sure i follow the question: Can you elaborate or re-state?

I have checked generic camera implementation to find out how you included webrtc support into it. I own a custom integration (eufy security) and i am implementing camera entities there using rtsp. I want to support webrtc feature as you jave done into generic camera.

Or can we say that all camera implementations are inheriting this feature from generic camera?

Hi, thanks for the follow up. This was implemented so that every rtsp integration can use it, since it is just based on the RTSP stream url. You can see Camera Entity | Home Assistant Developer Docs if you’re developing a custom component for a little detail about how it works.

1 Like

Hi i run this addon and it really helps in faster loading of cards and low latency but any way how to share the camera live feed to echo show?

It may work to cast a home assistant panel that contains the card with a webrtc view in it. I’ve done this on other displays.

Yeah casting should work but unfortunately cant cast in echo devices

OK i may be using the wrong terminology – i don’t have an echo show, but I think the takeaway should be that as a workaround if native webrtc support doesn’t work you can take a panel and try to display the panel on the echo show somehow. For example however this discussion resolves: Alexa Skill to display Lovelace dashboards on Echo Show

1 Like

Thanks for this Alan. My load times have not improved when initially connecting (still about 16 sec) but subsequent views and loading the full resolution stream have improved by about 4x.

Looking forward to remote access. Let us know if you need beta testers for it.

2 Likes

Is it me or is the add-on very unstable?..

I have about 15 cameras and basically after getting 4 cameras in… I’m getting a hard crash of the docker container. Even after removing the cameras, and trying to restart the container, it starts up and dies right away with panic. This panic (the one below) is just with a single camera added.

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 01-rtsp-to-web: executing…
[10:10:15] INFO: Updating configuration
[cont-init.d] 01-rtsp-to-web: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[10:10:16] INFO: Starting discovery service
[10:10:16] INFO: Starting RSTPtoWeb
[10:10:17] INFO: Successfully send discovery information to Home Assistant (8083).
panic: runtime error: index out of range [0] with length 0
goroutine 11 [running]:
main.StreamServerRunStreamRTMP(0xc000039540, 0xf, 0x12dd5e0, 0x1, 0xc0004969a0, 0x0, 0x0, 0x0)
/workspace/streamCore.go:265 +0x1291
main.StreamServerRunStream(0xc000039540, 0xf, 0x12dd5e0, 0x1, 0xc0004969a0, 0x0, 0x0, 0x0)
/workspace/streamCore.go:67 +0x14cb
main.StreamServerRunStreamDo(0xc000039540, 0xf, 0x12dd5e0, 0x1)
/workspace/streamCore.go:47 +0x4fa
created by main.(*StorageST).StreamChannelRunAll
/workspace/storageStreamChannel.go:42 +0x18a
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.