go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Homekit Module ... no response

Open InstigatorX opened this issue 6 months ago • 23 comments

For life of me can't get HomeKit going. I'm trying to use an RTSP and make it available via HomeKit. I can pair successfully, but get NO RESPONSE afterwards. What logging do you recommend I turn on?

Here's my config...

homekit:
  test_ext:
    pin: 12345678
    name: Test
    pairings:
      - client_id=8BCFE8B6-D91C-4835-AFBA-DA9D8FC9B54B&client_public=0c7b64b4f2804c2143f88a19bce8ca64910b976e0dff908ff8751014aaa27b79&permissions=1
      - client_id=E5A9C9C0-D97D-4D1B-AD18-043892D62628&client_public=641c20d28164c20a30335ac93b37a65aeb8f7b0f29908d60d1ba9a1ba05cb750&permissions=1
      - client_id=91512264-8E98-435E-B1EF-C6AE3F61EBFE&client_public=7e4dce9f25c4e7bb89719c688e30619ae8ee69d380cceba6c57a97ab4288b502&permissions=1
    
streams:
    test:
      - rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=0
    test_sub:
      - rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=1
    test_ext:
      - rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=2
      - ffmpeg:test_ext#video=h264#hardware
      - ffmpeg:test_ext#audio=opus

InstigatorX avatar Jul 02 '25 21:07 InstigatorX

At what exact moment do you get NO RESPONSE? Maybe screenshot.

AlexxIT avatar Jul 07 '25 13:07 AlexxIT

At what exact moment do you get NO RESPONSE? Maybe screenshot.

As soon as I add it to HOME app on iPhone.

Image

InstigatorX avatar Jul 07 '25 15:07 InstigatorX

How do you install/setup go2rtc? Does it have direct network access for all ports?

AlexxIT avatar Jul 07 '25 16:07 AlexxIT

Yessir. I've tried with docker as well as just running binary directly on Unbuntu.

services: go2rtc: image: alexxit/go2rtc:master-hardware shm_size: '1024m' network_mode: host # important for WebRTC, HomeKit, UDP cameras privileged: true # only for FFmpeg hardware transcoding restart: unless-stopped # autorestart on fail or config change from WebUI environment: - TZ=America/New_York # timezone in logs devices: - /dev/dri:/dev/dri volumes: - "/etc/go2rtc:/config" # folder for go2rtc.yaml file (edit from WebUI)

On Mon, Jul 7, 2025 at 12:15 PM Alex X @.***> wrote:

AlexxIT left a comment (AlexxIT/go2rtc#1793) https://github.com/AlexxIT/go2rtc/issues/1793#issuecomment-3045769862

How do you install/setup go2rtc? Does it have direct network access for all ports?

— Reply to this email directly, view it on GitHub https://github.com/AlexxIT/go2rtc/issues/1793#issuecomment-3045769862, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANJ2YHOIBQXFQJHJBGY4GD3HKMJDAVCNFSM6AAAAACAVCJ3LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANBVG43DSOBWGI . You are receiving this because you authored the thread.Message ID: @.***>

InstigatorX avatar Jul 07 '25 16:07 InstigatorX

Have you tried test_ext stream from WebUI or via RTSP? Is it works?

AlexxIT avatar Jul 07 '25 16:07 AlexxIT

Have you tried test_ext stream from WebUI or via RTSP? Is it works?

Yes, I have 14 cameras configured and working well with Frigate and VLC. I'm using standalone instance of go2rtc (not the one embedded in Frigate).

InstigatorX avatar Jul 07 '25 17:07 InstigatorX

Maybe there are some specific settings in your local network. Which block UDP traffic between the phone and go2rtc.

AlexxIT avatar Jul 08 '25 04:07 AlexxIT

I have Scrypted running and HomeKit works fine. Both servers are on same subnet. Also, I can discover camera fine and pair it. On Jul 8, 2025, at 12:11 AM, Alex X @.***> wrote:AlexxIT left a comment (AlexxIT/go2rtc#1793) Maybe there are some specific settings in your local network. Which block UDP traffic between the phone and go2rtc.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

InstigatorX avatar Jul 08 '25 11:07 InstigatorX

I have no idea yet what else the problem might be.

AlexxIT avatar Jul 08 '25 12:07 AlexxIT

I have no idea yet what else the problem might be.

Is there any sort of logging you could suggest I turn on to help diagnose better? I'm more than willing to help figure out if it's a bug.

InstigatorX avatar Jul 08 '25 14:07 InstigatorX

Yes. You can enable trace logs:

log:
  level: trace

AlexxIT avatar Jul 09 '25 14:07 AlexxIT

FWIW Same on my end. The stream appears fine in the web.

Curious @InstigatorX what version of iOS / Apple Home are you using? My phone is on the 26 Public Beta, but my laptop is on whatever the current stable is.

The go2rtc homekit camera works fine on macOS stable, but not on iOS26. Here's a screen recording of Home on the laptop next to iPhone Mirroring of Home on iOS:

https://github.com/user-attachments/assets/fc3c614c-9005-4a98-86ce-e774c6a284e3

mikew avatar Aug 29 '25 13:08 mikew

Dang, Scrypted does work on iOS26 Beta but my god what a racket that thing is compared to go2rtc.

mikew avatar Aug 29 '25 20:08 mikew

Same issue, all cameras stopped working after update to ios26

pduchnovsky avatar Sep 27 '25 18:09 pduchnovsky

iOS 26 problem fixed in the latest release.

AlexxIT avatar Sep 28 '25 10:09 AlexxIT

Awesome, can confirm it now works fine :)

pduchnovsky avatar Sep 28 '25 18:09 pduchnovsky

I am getting video but, there are a couple of issues.

  1. for some reason, they are adding as cameras but not showing in the home settings as cameras. In my cameras there is one added via scrypted and one I added via go2rtc. there are 3 other cameras that are added but not in the settings; I can view them but not change settings for it.
  2. one camera failed, so I removed it. but now it's not appearing as a camera to add. Could be a state file issue if there is one in go2rtc. In the cfg, there is no pairings listed for this camera.
  3. still getting errors logged: a) 4:46:56.272 PM | error | undefined error=hap: PairVerify from: 192.168.x.x:51084, with unknown client_id: removed for this post caller=github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:189 b) 4:46:56.272 PM | error | undefined error=hap: PairVerify from: 192.168.x.x:51084, with unknown client_id: removed for this post caller=github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:189

is there a way to properly set up a dev environment so I could help debug?

Image

rsperry79 avatar Sep 29 '25 00:09 rsperry79

update:
I found that if I view another camera, I can change the current camera via a drop down menu and that allowed me to delete the orphan camera. This allowed me to readd the camera to the home. It also appears that the other camera listed was not from the go2rtc instance but an orphan camera added via scrypted.

update 2: when I added the last remaining camera that was in scrypted, frigate overwrote the config removing the pairing lines containing the removed ID. Generating the following error: undefined error=hap: PairVerify from: APPLE TV IP :52178, with unknown client_id: REMOVED ID caller=github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:189

update 3: I tried commenting out the go2rtc section in frigate but this just writes the following as its config file in go2rtc:

api: origin: '*' hass: config: /homeassistant log: format: text webrtc: candidates:

  • stun:8555 ffmpeg: bin: /usr/lib/ffmpeg/7.0/bin/ffmpeg

The current work around is for me to pair them, then go to go2rtc/config and save the homekit section to another file/pc as restoring the section makes it work again. One idea is to move this to a separate state file so it wont be overwritten.

update 4: https://github.com/blakeblackshear/frigate/discussions/20261 as the nuked config really shouldn't happen.

update 5: the initial log errors appear to have been caused by the hidden orphan camera. the only errors I see now are on camera closing in apple home. a) undefined error=write tcp 192.168.NVR SUBNET.SERVER:1984->192.168.PRIVATE SUBNET.CLIENT:62211: use of closed network connection caller=github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:189 b) undefined error=EOF url=ffmpeg:front_side_main#video=h264#rotate=90#audio=copy#hardware=vaapi caller=github.com/AlexxIT/go2rtc/internal/streams/producer.go:170

rsperry79 avatar Sep 29 '25 03:09 rsperry79

  • PairVerify with unknown client_id - This is a normal error. Apple changed the ID in the new OS. I don't know why they did this, but it doesn't affect operation.
  • I don't know how to use go2rtc homekit server inside Frigate.
  • use of closed network connection - This is a known error. It doesn't affect functionality. It will be removed in a future update.

AlexxIT avatar Sep 29 '25 11:09 AlexxIT

Do you know if the cameras not showing up as cameras in the Apple Home settings is due to the lack of them being secure? Without it, I cannot enable the Apple alert if x happens when I am not home and it will not record the streams. I use this as a failsafe system.

I am a dev, just not a Go dev. If you have a dev env setup guide I would be happy to set it up and run tests for you. Also I'm assuming go is a weird python-esqe language that should be somewhat easy to learn enough to help fix that system. I have a background in cpp, C#, python, JS, and a few other languages.

rsperry79 avatar Sep 29 '25 21:09 rsperry79

If you are asking about HKSV, it is not supported.

AlexxIT avatar Sep 30 '25 09:09 AlexxIT

@AlexxIT

If you are asking about HKSV, it is not supported

Do you mean it is not supported specifically for ios26? Because before the upgrade it did work for me just fine -- running frigate with go2rtc config to export cameras to homekit, which then adopted to appletv and streaming to my phone while I am away works just fine (just not the recording / detection via homekit).

akamensky avatar Oct 11 '25 12:10 akamensky

HKSV is not about streaming via Apple Home. It is about recording.

AlexxIT avatar Oct 11 '25 12:10 AlexxIT