Add on: RTSPtoWeb and RTSPtoWebRTC

I didn’t have todo anything , remote access was just working with the Lovelace card before… I think it’s b cause of the frontend card itself that makes connection…

I hope it’s possible, and also without port forwarding…

already tried to add this cam in frigate card? does not work for me for live provider

No MSE. The port thing could work? It’s using default config.json, but maybe would be cool to expose the port list in the add on. I haven’t tried it.

No MSE , so remote connect not yet available? Is it on todo list?

Does the RTSPtoWeb - WebRTC add-on support the extra Video Endpoints? I’m trying to view the http feed but I can’t get it working (following the example
http://{my_ip}:8083/stream/{entity_id}/channel/0/webrtc ). I’m just getting a ‘404 page not found’ error.
However I can view the feeds from Home Assistant within the webgui

I am facing the same issue

[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] done.
[services.d] starting services
[services.d] done.
[14:10:34] INFO: Starting discovery service
[14:10:34] INFO: Starting RSTPtoWebRTC
2022/02/03 14:10:34 Server Start Awaiting Signal
2022/02/03 14:10:34 Start HTTP Server error listen tcp :8083: bind: address already in use
[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.

Did you stop/uninstall Alex’s WebRTC addon? You must do that or you won’t be able to start this new one.
But, i managed to add camera only to figured it out same thing as others: camera is not available from outside. Since in Alex’s addon camera IS available from outside i guess that i’ll stick with Alex addon for now.

1 Like

Alex addon? You mean his custom component, right?

I’m not getting this… WebRTC streams should be visible on the lovelace cards without having to open external ports right? It’s not working for me… I can view all streams internally using either camera entity or RTSPtoWeb GUI, but externally they all fail. The log says:

2022/02/03 21:30:51 http: panic serving 172.30.32.2:44344: write tcp 172.30.32.1:8083->172.30.32.2:44344: write: broken pipe
goroutine 4104 [running]:
net/http.(*conn).serve.func1(0xc0003b21e0)
	/usr/lib/go/src/net/http/server.go:1804 +0x153
panic(0xc86e40, 0xc00035b130)
	/usr/lib/go/src/runtime/panic.go:971 +0x499
github.com/gin-gonic/gin.(*Context).Render(0xc003004200, 0xc8, 0xe618e8, 0xc001986030)
	/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:928 +0x17c
github.com/gin-gonic/gin.(*Context).HTML(0xc003004200, 0xc8, 0xd56920, 0xa, 0xc72b40, 0xc000b110b0)
	/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:937 +0x99
main.HTTPAPIServerIndex(0xc003004200)
	/build/github.com/deepch/RTSPtoWeb/apiHTTPRouter.go:164 +0x237
github.com/gin-gonic/gin.(*Context).Next(...)
	/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:168
main.CrossOrigin.func1(0xc003004200)
	/build/github.com/deepch/RTSPtoWeb/apiHTTPRouter.go:313 +0x3c3
github.com/gin-gonic/gin.(*Context).Next(...)
	/root/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:168
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0003664e0, 0xc003004200)
	/root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:555 +0x2b0
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0003664e0, 0xe66630, 0xc0004b20e0, 0xc003004100)
	/root/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:511 +0x16b
net/http.serverHandler.ServeHTTP(0xc0004b22a0, 0xe66630, 0xc0004b20e0, 0xc003004100)
	/usr/lib/go/src/net/http/server.go:2867 +0xa3
net/http.(*conn).serve(0xc0003b21e0, 0xe687e0, 0xc000ee0dc0)
	/usr/lib/go/src/net/http/server.go:1932 +0x8cd
created by net/http.(*Server).Serve
	/usr/lib/go/src/net/http/server.go:2993 +0x39b

Yes, i mean THIS custom component.Sorry, i wrote “addon” by mistake.

Yeah I reverted back too, too bad tough, really liked it…
But I need external access

1 Like

Hi Allen,

Thanks so much for your hard work with the add-on and integration. I have gotten it working.

I do find there is about 5-6 second delay for the feed to start. Sometimes the card is black and doesn’t load, the webpage needs to be refreshed to display the video.

Regards,
Sam

Why should we be using an add-on for this when the integration from Alex worked?

I too was confused when I went to integrations and it wanted a url. Text on the integration setup screen to say install the add-on first would help.

1 Like

See the explaination above about the differences. If you already are using the custom component and happy with it, i’m not sure you should do anything…

Integrations typically don’t have an opinion about where you run the server, so its not really appropriate to mention the add-on. For example, if you install motion eye integration it asks you for your motion eye url.

If you install the add-on first as described in this post, then it should get auto discovered. That is why I made this post.

This delay to start can be also be caused by camera itself. For picture to show you must receive camera’s mainframe, which is sent every n seconds (depends on camera settings, also called an “I” frame). That n can be very well 5 or more seconds, because with increasing it you save bandwidth. I have all cameras set to 2s, which is minimum for many cameras. Otherwise camera feed in this addon is pretty much live, without delay.

If you install the add-on first as described in this post, then it should get auto discovered. That is why I made this post.

Allen: Correct. It is auto discovered. Maybe it would be a good idea to mention in first post that the two (yours and Alex’s) are not compatible and can’t live together to save errors and troubles.

I hope that there’s no hard feelings… I didn’t mean anything bad by mentioning alternative, i admire your work, as much as all others who participate in HA. I love to use it, and i love to test all new things which are usable for me to see if there’s any new function to be used… But i’m only noob in programming. I know just that much that i’m aware that a lot of knowledge is needed in order to write and maintain all these things.

Thanks a lot!!!

Yeah, I wasn’t expecting people already using Alex’s custom component to need this. As mentioned above a few times, no need to switch away from the custom component of you’re already using it and happy with it.

1 Like

Hey @allenporter , I really like this addon, especially because the camera entities are now using webrtc… This was not possible on the Alex card…
But is MSE coming , so we can watch cameras remote?

If you’re using RTSPtoWeb check out https://github.com/deepch/RTSPtoWeb/blob/765414885c5f6cd9b922d1e1364d861c22b200ef/docs/api.md for the various APIs. However, almost all of these require some kind of html page to drive them. You can’t just load the webrtc endpoint, you have to have javascript open a webrtc channel for example.

Have you seen the dashboard at / where you can click and view the various streams using the RTSPtoWeb interface?

My impression is that RTSPtoWeb supports MSE here: https://github.com/deepch/RTSPtoWeb/blob/765414885c5f6cd9b922d1e1364d861c22b200ef/docs/api.md#mse though I am not aware of official support in home assistant for it. My impression is this the existing webrtc custom component uses a custom lovelace card.

Yes, maybe the card is making it possible indeed…
With Alex edition, the card is needed, with yours not, that makes it nice indeed…
So maybe it’s a frontend issue then