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

Add docs for supporting HomeKit camera source via go2rtc #5321

Open
NickM-27 opened this issue Jan 31, 2023 · 14 comments
Open

Add docs for supporting HomeKit camera source via go2rtc #5321

NickM-27 opened this issue Jan 31, 2023 · 14 comments
Labels
documentation Documentation for Frigate pinned

Comments

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Jan 31, 2023

Go2rtc supports the ability to pair HomeKit Secure Video (HKSV) cameras and use them as a source in the config. However, this includes a few caveats:

  1. There is metadata stored in a file which will need to be mapped to the users host so it is not forgotten on container restart
  2. The container will be required to run in host mode
  3. User will need to access the go2rtc frontend to enter the homekit pairing code
@NickM-27 NickM-27 added pinned documentation Documentation for Frigate labels Jan 31, 2023
@NickM-27 NickM-27 changed the title Add docs for support HomeKit camera source via go2rtc Add docs for supporting HomeKit camera source via go2rtc Jan 31, 2023
@consolecwby
Copy link

I have been trying to do this. Currently running both frigate and scrypted. I tried adding cameras through Home assistant but it was to buggy. Would like to add cameras from frigate/go2rtc to HomeKit directly.

@NickM-27
Copy link
Sponsor Collaborator Author

NickM-27 commented Jan 9, 2024

this can be done, it is just a bit of a manual process

@larivierec
Copy link

I've been trying to add this in so i can properly stream to Home.app

  1. add frigate stream + homekit sections -> https://github.com/larivierec/home-cluster/blob/45e8751e9ef31c2671ccc865023724bbb4caa5b9/kubernetes/apps/home/frigate/app/config/config.yml#L51-L64
  2. use go2rtc ui to add Homekit item? larivierec/home-cluster@7970437#diff-3f4a9d117af608678e0997191e455422c3d25fd093c986448ad5846138f0a9bbR103-R115 (these are internal) and also not working it's throwing -> ERROR: tlv8: unmarshal zero data
  3. add pairing to /config/go2rtc.yaml ? obviously, once step 2 works.

am i missing something?

@NickM-27
Copy link
Sponsor Collaborator Author

add pairing to /config/go2rtc.yaml ? obviously, once step 2 works.

no, it should be added to the frigate config under the go2rtc section

@halk1982
Copy link

halk1982 commented Mar 16, 2024

Hello there, I'm facing the exact same issue. While I added the go2rtc config into the Frigate config file:

image

I'm having this error when trying to pair any camera from Go2RTC to Homekit directly:

image

My setup: HAOS on a Beelink (Intel N100 mini PC) and Frigate as an Home Assistant addon. Go2RTC not as an extra addon in HA, as it's embedded and used from Frigate.

@unibeck
Copy link

unibeck commented Mar 20, 2024

I get the same error ERROR: tlv8: unmarshal zero data. It appears that all of our IPs are from the docker bridge network, for example mine is 172.30.33.6, and not the host IP.

As NickM mentioned in his OP, we need to run frigate with network_mode host. Though, at least for the home assistant addon, I don't see an option to run with network_mode host.

@unibeck
Copy link

unibeck commented Mar 20, 2024

^I confirmed this by manually editing the HA addon to use the host network instead. The IP on the web UI now shows the host IP and I can add the camera to HomeKit.

@NickM-27 can we add support to the HA addon for the host network? I don't see a GH issue for it, though I can create on if this is something this repo wants to support. I wouldn't mind taking a stab at it either if given some direction.

@NickM-27
Copy link
Sponsor Collaborator Author

NickM-27 commented Mar 20, 2024

frigate uses a lot of ports internally, running as host will require all of those ports to be open (ports are not configurable in host mode) or frigate will conflict with other services for users, causing problems.

At this point the addon not support host mode is on purpose and expected

@unibeck
Copy link

unibeck commented Mar 20, 2024

Understood. Are there any other options for this use case?

@NickM-27
Copy link
Sponsor Collaborator Author

not running in an addon, or spinning up your own addon

@halk1982
Copy link

Thank you very much for your responses @NickM-27 . It looks like a dead end then, at least for my skills set. @unibeck I was thinking to install Scrypted HA Addon and then use the Rebroadcast address to go2rtc, which will continue feeding Frigate for object detection etc. The only challenge with this way is that then I need to use mqtt object detection from Frigate to Scrypted (not sure how complex that can be). Do you think this setup is an overkill ? Right now I used the Generic camera HA integration (with go2rtc links) and notifications in Homekit are missing. If I use what Frigate integration is offering as cameras, live view doesn't work (check issue: blakeblackshear/frigate-hass-integration#402 ). Any ideas/suggestions are more than welcome.

@unibeck
Copy link

unibeck commented Mar 20, 2024

I don't know about all that, it does seem overkill though.

I previously used Scrypted to get my cameras into HomeKit, which worked alright. Notifications in HomeKit worked fine, though I never implemented my cameras into HA. So sorry, I can't help with that.

I am trying go2rtc and frigate now for better performance and custom AI model support.

@halk1982
Copy link

I don't know about all that, it does seem overkill though.

I previously used Scrypted to get my cameras into HomeKit, which worked alright. Notifications in HomeKit worked fine, though I never implemented my cameras into HA. So sorry, I can't help with that.

I am trying go2rtc and frigate now for better performance and custom AI model support.

Thank you @unibeck

@piscinas
Copy link

piscinas commented May 4, 2024

I have successfully install my cameras on HomeKit. I copied the config code that has paired data to the frigate config.
It is possible to add some dummy sensor that it was activated by the detection of camera, that can be passed to HomeKit as a motion sensor? Don’t need to be passed to homeassistant… something that generate the Homeassistant notification will activate that sensor…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation for Frigate pinned
Projects
None yet
Development

No branches or pull requests

6 participants