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.54k stars 181 forks source link

Running WebRTC with built in go2rtc inside Home Assistant Docker cannot find `go2rtc.yaml` config. #721

Closed Ionshard closed 2 months ago

Ionshard commented 4 months ago

I am running home assistant via the linuxserver docker image. I installed the WebRTC integration and when installing it prompted for a username and password and then created a file inside my homeassistant config directory (/config/go2rtc.yml inside the container) and populated it with the username and password for the api and rtsp. I then added some streams to the config.

However, when I visit the API portal (on port 1984) it is unauthenticated and it seems to be attempting to read the config from /run/s6-rc:s6-rc-init:cddgjJ/servicedirs/svc-homeassistant/go2rtc.yaml (inside the container)

This appears to be the exact same issue discussed in #589 however it seems like it was incorrectly identified to be an issue with Frigate. However I am not running Frigate at all and I still have the exact same issue. I am ONLY running go2rtc via WebRTC inside the homeassistant docker container which is running via host networking.

image

Is there some way I can configure go2rtc to run with the correct configuration file?

P.S. I definitely could solve this by running go2rtc as it's own docker service ... however I only have a single doorbell camera, so I would really prefer to keep the simple install.

AlexxIT commented 2 months ago

Why you not using official Hass docker image? I don't have plans for support 3rd party images. You'd be better off using go2rtc in a separate container to solve the problem

Ionshard commented 2 months ago

Why you not using official Hass docker image? I don't have plans for support 3rd party images. You'd be better off using go2rtc in a separate container to solve the problem

That's fair, it was more a request to support allowing us to configure it rather than supporting the 3rd party image directly. I ran the 3rd party image because my HA setup was a very old setup.

That said, it is a very rare edge case and it's very understandable that you wouldn't want to support it. Furthermore I myself no longer even run the linuxserver image and have since moved my setup over to the HomeAssistant OS on a NUC in order to explore using Frigate.

So feel free to close this issue and thank you for your time!

AlexxIT commented 2 months ago

By default go2rtc will search config in the current work dir. For default Hass image and go2rtc image - it's /config.