Go2rtc project - help thread

Hi,

First of all, Happy New year and all the best wishes for everyone.

I’ve got the LSC Smart Outdoor Camera from the Action as a Christmas present. Thing works great in HA with the Tuya integration. However, I’m trying to get it to work in Frigate so I can record the camera stream to my local NAS. Problem is that the thing does not seem to expose an rstp stream.

So after a long search I found this nice integration that should be able to get it to work:

It uses Go2rtc to actually get the stream. In my go2rtc.yaml I have this:

streams:
  Voortuin:
    - echo:bash /config/custom_components/expose_camera_stream_source/get_stream.sh camera.lsc_smart_outdoor_camera

However, when I check the configuration before restarting HA I get the following error:
Package go2rtc setup failed. Component streams Integration 'streams' not found.

I tried various things, like accessing the camera via a camera proxy to get this streams integration loaded; all to no avail. Then again, in my configuration.yaml I do have:
default_config:

which should automatically load the streams integration if I’m not mistaken.

Any help someone can give will be greatly appreciated.

Kind regards,
Louis

1 Like

Here are a few bugs I am experiecing with the WebRTC Camera beta and Go2RTC:

  1. So I am currently running the Go2RTC v0.1-rc.6 along with WebRTC Camera V3.0-beta3. All is working well on my local network but when I try to access my cameras from WAN I get these following errors in the log:
2023-01-03 12:10:54.104 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.
2023-01-03 12:10:54.349 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.
2023-01-03 12:10:54.507 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.
2023-01-03 12:10:54.599 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.
2023-01-03 12:10:54.651 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.
2023-01-03 12:11:01.282 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.
2023-01-03 12:11:01.430 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.
2023-01-03 12:11:01.730 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.
2023-01-03 12:11:02.029 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.
2023-01-03 12:11:02.093 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.
2023-01-03 12:11:02.162 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:561:33 NotFoundError: The object can not be found here.

Here’s some more info from Chrome console:

Here are some more logs:

2023-01-03 19:31:01.209 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:563:22 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
2023-01-03 19:31:04.381 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:563:22 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
2023-01-03 19:31:05.779 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:563:22 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
2023-01-03 19:31:08.878 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:563:22 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
2023-01-03 19:31:12.166 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:563:22 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
2023-01-03 19:31:15.129 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:563:22 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
2023-01-03 19:31:18.408 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:563:22 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
2023-01-03 19:31:21.440 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:563:22 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
2023-01-03 19:31:25.742 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:563:22 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
2023-01-03 19:31:41.299 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:509:31 Uncaught TypeError: Cannot read properties of null (reading 'connectionState')
2023-01-03 19:32:13.918 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:509:31 Uncaught TypeError: Cannot read properties of null (reading 'connectionState')
2023-01-03 19:32:25.296 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/webrtc/video-rtc.js:509:31 Uncaught TypeError: Cannot read properties of null (reading 'connectionState')
2023-01-03 19:34:36.219 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/hacsfiles/kiosk-mode/kiosk-mode.js?hacstag=497319128173:37:45 TypeError: null is not an object (evaluating 'e.shadowRoot.querySelector("hui-root").shadowRoot')
2023-01-03 19:34:42.204 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/hacsfiles/kiosk-mode/kiosk-mode.js?hacstag=497319128173:37:45 Uncaught TypeError: Cannot read properties of null (reading 'shadowRoot')
2023-01-03 19:35:07.296 ERROR (MainThread) [frontend.js.latest.202212131] https://**redacted**.ui.nabu.casa/hacsfiles/kiosk-mode/kiosk-mode.js?hacstag=497319128173:13:44 Uncaught TypeError: Cannot read properties of null (reading 'querySelector')

After this, seems like my connection to HA hangs and I need to force close the app before trying to reconnect which takes a few minutes. I am able to access the Go2RTC webpage via WAN and successfully view the stream through there, but viewing through the lovelace custom WebRTC camera card, it hangs and never connects.

  1. I have my config for each custom card to have background: true but that never seems to keep the camera’s live will in the background. Used to work flawlessly before the beta.

  2. On iOS companion app, when a livestream would start the iOS native UI would show up allowing you to do full screen and PIP etc. this no longer shows up. This is not to be confused with the WebRTC camera UI, as when I set that ui: true the WebRTC UI shows up but I am not able to click anything there either.

PS: Not sure if I should post this in the WebRTC camera thread of here.

Hi all, I got this addon installed and working within home-assistant but I want to be able to be able to transcode/translate an RTSP stream to a WebRTC stream so I can display a camera’s feed in a pop-up window on my TV. How do I generate a URL to do this that I can transmit to my TV?

Firstly, thanks to AlexxIT for creating another great add on.
I have been using WebRTC camera for a while, but on a dedicated lovelace page for an internal touchscreen as I could never get it to work externally on my iphone (I understand these will only stream HLS). I’ve just now installed Go2RTC as a HA add-on along with the RTSPtoWebRTC integration and my cameras are all pulled in to Go2RTC. The existing picture glance cards with the original camera entities are now loading much faster with no latency, which is awesome.

Unfortunately, I’m still having issues with external access via iphone. If I understand correctly, Go2RTC should be using webrtc to stream, but I get a static image for the preview but clicking on the card then doesn’t load an image and just shows the play and forward/back 10sec icons.

I have created a go2rtc.yaml file under /config with the below and have port forwarded port 8555 from my static WAN IP to my HA IP

webrtc:
  listen: ":8555"  # address of local server (TCP)
  candidates:
    - x.x.x.x:8555  # static public IP-address
log:
  level: info # default level
  api: debug
  rtsp: debug
  streams: debug
  webrtc: debug

I’m not sure that Go2RTC is actually reading this file though as i’m not getting any additional logging in the log tab of the add-on. Am I wrong in placing this file under /config?

Thanks for any assistance

I have had many issues with the picture glance card not loading live streams so it may be a picture glance issue.

A way to check if your port forwarding is working correctly is setting the Go2RTC addon so that it shows up in the side bar and from there while on your WAN network click the Go2RTC icon from the left. If that loads press the stream link on any of your cameras, if the stream loads it means that everything is port forwarded correctly and maybe an issue elsewhere (ie the picture glance card). I would recommend trying out the Frigate card or waiting till the Beta version of the WebRTC Camera is out for release which uses its own custom card which in my experience works the best.

Thanks very much for the great suggestions. I can confirm I am able to bring up the Go2RTC webui externally and by clicking the stream link it streams an MP4 stream from my cameras.

So based on this you’re suggesting it may be a card issue? I do have the frigate custom card so will have a play with that and see if it resolves the streaming issue externally. Thanks again for the advice

I tried using Frigate and I am getting a livestream… it’s not stable but I am also running into other issues. I would give Frigate card a try though maybe it will work better for you

@pabla @sierra055 Both of you are looking at an mp4 stream because you have an iPhone and WebRTC didn’t work. It has not yet been tested well and may have bugs.

@sierra055 your config rigth and should work if you have public IP and you have forwarded the port on router

Okay based on that info I set mode: webrtc to force RTC and it seems to work fine locally, and the native iOS video player UI shows up again.

As for external access I am not just seeing the “loading2” on the top right of the custom card and no stream. Don’t currently see any of the same errors in the log. If I am understanding the documentation for go2rtc correct, external access on the iPhone companion app will only allow HLS?

Thanks for confirming, correct I have my static WAN IP listed here. It’s just odd that i’m not getting any logging taking place.

I’ve tried using the Frigate card using but also get some funky issues where the cameras may or may not show and then disappear.

I’ve been logging attempts to port 8555 and literally have no traffic hitting it. This coupled with the lack of logging makes me question whether the go2rtc.yaml file is actually being looked at?

PS. For disable bachannel just add #backchannel=0 to end of RTSP link.

How do you disable backchannel for a home assistant camera (for example from the Amcrest integration)?

I’m trying to allow my Amcrest motion and audio events to continue to come through to home assistant. With Go2RTC and the RTSPtoWeb integration enabled these events get blocked.

Check in docs You can add camera entity_id to go2rtc config

Hi there, I got one problem with playing WebRTC camera stream on Frigate Lovelace card.
I added WebRTC Camera integration and then setup WebRTC Card:

type: custom:webrtc-camera
entity: camera.192_168_0_118
mode: webrtc

It immediately started camera stream in RTC which is what I want.

But if I add that camera in Frigate Lovelace component, it started the stream in MSE

type: custom:frigate-card
cameras:
   webrtc_card:
      entity: camera.192_168_0_118

Is there any way to force stream only in RTC ? Or should I rather ask in Frigate Lovelace Card discussion ?

Thanks

If you asking about WebRTC v3, there is mode option, where you can select technology

yes I know that, I got mode: webrtc, which works well in Web RTC Card as I mentioned before.

type: custom:webrtc-camera
entity: camera.192_168_0_118
mode: webrtc

Problem is only in Frigate Lovelace Card.

I’m confused though the docs say to add #backchannel=0 to the end of RTSP link.

So would my go2rtc.yaml look like this?

streams:
  "camera.hall": rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif#backchannel=0

Yes. Looks good

I’m still trying to plug away with this. Everything works great on a PC internall (but then it always was with the last add-on).

What i’ve found is that by having the documented Google STUN server configured in the RTSPtoWebRTC integration, i get no hits on my firewall for port 8555. I also get only a static image appear of the cameras in preview (both in picture glance card and Frigate card). Clicking on the camera just gives the play icon and no video.

Removing the STUN server from RTSPtoWebRTC then shows traffic coming in on port 8555 and I get some cameras showing live images, but others saying WebRTC timeout on both card types.

Use WebRTC Camera v3 card