Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Support]: go2rtc HomeKit module pairing list writeback to config.yml #9016

Open
civita opened this issue Dec 19, 2023 · 7 comments
Open

[Support]: go2rtc HomeKit module pairing list writeback to config.yml #9016

civita opened this issue Dec 19, 2023 · 7 comments
Labels
beta Related to the current beta version of frigate enhancement New feature or request pinned

Comments

@civita
Copy link

civita commented Dec 19, 2023

Describe the problem you are having

I am using HomeKit module from go2rtc and am able to pair cameras and view them in Apple Home app. However, it works until Frigate restarts.

In go2rtc logs, it shows the following error after restarting Frigate:
ERR github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:179 > error="hap: PairVerify from: 10.8.0.86:49347, with unknown client_id: ..."

It looks like go2rtc will append client_id to config.yml after successful pairing. However, the file go2rtc uses in Frigate instance is located in /dev/shm/go2rtc.yaml which is a tmpfs filesystem and will be re-generated from Frigate's config.yml after restart.

The workaround I am using is looking at the go2rtc.yaml (directly or via :1984), finding client_id, and manually add it into config.yml in Frigate:

go2rtc:
  streams:
    camer_1:
      # ...
  homekit:
    camera_1:
      # the following two lines are manually added
      pairings:
       - client_id=...

I would like to know if there's better way to do that. Thanks.

Version

0.13.0-C35C7DA

Frigate config file

go2rtc:
  streams:
    camer_1:
      # ...
  homekit:
    camera_1:
      # the following two lines are manually added
      pairings:
       - client_id=...

Relevant log output

ERR github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:179 > error="hap: PairVerify from: 10.8.0.86:49347, with unknown client_id: ..."

FFprobe output from your camera

N/A

Frigate stats

No response

Operating system

Debian

Install method

Docker CLI

Coral version

USB

Network connection

Wired

Camera make and model

N/A

Any other information that may be helpful

No response

@NickM-27
Copy link
Sponsor Collaborator

I would like to know if there's better way to do that. Thanks.

this is the best way until frigate natively supports saving this data

@NickM-27 NickM-27 added enhancement New feature or request pinned beta Related to the current beta version of frigate and removed support triage labels Dec 19, 2023
@AlexxIT
Copy link

AlexxIT commented Dec 27, 2023

go2rtc supports multiple configs. And it will use first config as main config. So main config may be placed in the /config/go2rtc.yaml and second config may be placed to frigate.yaml

@skrashevich
Copy link
Contributor

go2rtc supports multiple configs. And it will use first config as main config. So main config may be placed in the /config/go2rtc.yaml and second config may be placed to frigate.yaml

And what happens if the camera name will changed through the frigate configuration?

@AlexxIT
Copy link

AlexxIT commented Dec 27, 2023

Anyway homekit section should be added manually to main config. If user has streams section in the frigate, he should sync names manually in two configs.

@kidhasmoxy
Copy link

@civita - are you running host networking in your compose? I'm using the addon for HomeAssistant and can't get the pairing to complete unless I run the go2rtc addon directly. Trying to see if I can modify the frigate addon to work properly with homekit pairing.

@civita
Copy link
Author

civita commented Feb 17, 2024

Hi @kidhasmoxy, sorry for the late reply. I am running Frigate docker version with privileged mode. If it's a pairing problem not sure if it's due to mDNS port used by multiple apps.

@AlexxIT
Copy link

AlexxIT commented Feb 17, 2024

I don't have problems with mDNS on server with go2rtc and some other software, that also using mDNS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Related to the current beta version of frigate enhancement New feature or request pinned
Projects
None yet
Development

No branches or pull requests

5 participants