go2rtc
go2rtc copied to clipboard
Can't homekit proxy a camera that is added via the `hass` module
I have two Eufy cameras ("eufy Security Indoor Cam C120"). If I add them to go2rt via the homekit source and then use the homekit module I can proxy that camera back to Apple Home. But if I add the camera via the hass source the proxy-back to Apple Home doesn't work. In both cases I can successfully see a camera image via the go2rtc generated streams.
The starting config essentially looks like this (all identifying numbers replaced with X):
streams:
dining_room_camera:
- homekit://192.168.1.X:X?device_id=X&device_public=X&client_id=X&client_private=X
- ffmpeg:dining_room_camera#audio=aac#audio=opus
kitchen_camera:
- hass:Kitchen Camera
- ffmpeg:kitchen_camera#audio=aac#audio=opus
homekit:
dining_room_camera:
pin: X
name: Dining Room Camera
kitchen_camera:
pin: X
name: Kitchen Camera
log:
level: trace
streams: trace
homekit: trace
At that point all the go2rt streams work.
I then start to add these cameras to my Apple Home. It all works well for the dining room camera: I start the pairing process in the Apple Home app, enter the pin that is X in the config and done.
When I then start to do the same for the kitchen camera, I get an error in the Apple Home app that says Unable to Add Accessory. Accessory is not reachable. The go2rtc config file is modified and there is a pairings element added to the homekit -> kitchen_camera element with a sub element client_id that looks exactly like the pairing info that is there for the successfully paired dining room camera. The log shows the following (again any identifying numbers replaced by X):
11:23:34.543 TRC [homekit] 192.168.1.X:X: add pair id=X public=X perm=1
11:23:34.543 TRC [homekit] 192.168.1.X:X: get pair id=X
11:23:34.659 TRC [api] POST /pair-verify 192.168.1.X:X
11:23:34.668 TRC [homekit] 192.168.1.X:X: get pair id=X
11:23:34.669 ERR github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:185 > error="hap: can't dial witout client_id or client_private"
So, to me this looks as if something is not properly handed on during the pairing process between Apple Home and go2rtc, so that things crash halfway through.
Goto go2rtc WebUI > Add > Hass. Find your "Kitchen Camera". And copy-paste homekit source instead of hass.
That works, thanks! Still seems like a bug, right? Ideally this would work directly?
Yes. There is should no be difference.
I am trying to setup HomeKit proxy and I stumble across this issue.
I can’t quite figure out how to obtain “ homekit://192.168.1.X:X?device_id=X&device_public=X&client_id=X&client_private=X” for go2rtc to use for proxying.
Is there any pointers?
Thank you!
Pointers two comments above
This also does not work for me:
- I added the camera to Home Assistant (2025.5.1) through Homekit, it works there.
- Used the
WebUI > Add > Hassto find and add the homekit source. It also works on go2rtc. But I cannot add it to Home App on iphone. - Tried restarting phone, apple tv, camera, go2rtc addon, hass
| Time | Level | Message |
|---|---|---|
| 5:41:46.404 PM | info | go2rtc version=1.9.9 platform=linux/arm64 revision=fa580c5 |
| 5:41:46.404 PM | info | config path=/config/go2rtc.yaml |
| 5:41:46.405 PM | info | [rtsp] listen addr=:8554 |
| 5:41:46.405 PM | info | [api] listen addr=:1984 |
| 5:41:46.407 PM | info | [webrtc] listen addr=:8555 |
| 5:47:18.463 PM | error | undefined error=hap: VerifyClientAuthenticator caller=github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:189 |
| 5:47:40.560 PM | error | undefined error=hap: VerifyClientAuthenticator caller=github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:189 |
streams:
Roborock:
- roborock://...
Camera-Hub-G2HPro-0244:
- homekit://10.0.0.109:37417?client_id=XX&client_private=XX&device_id=XX&device_public=XX
homekit:
Camera-Hub-G2HPro-0244:
name: Aqara-G2H-Cam
log:
homekit: debug
Ok I was able to fix it by defining custom device_id. I guess it was a weird cache issue.
streams:
Aqara-G2HPro:
- homekit://...
homekit:
Aqara-G2HPro:
pin: 12341234
name: Aqara
device_id: aqara_g2hpro
device_private: aqara_g2hpro_private
https://github.com/AlexxIT/go2rtc/releases/tag/v1.9.12