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

Fix support HomeKit server on macOS #626

Closed
OskarLebuda opened this issue Sep 10, 2023 · 7 comments
Closed

Fix support HomeKit server on macOS #626

OskarLebuda opened this issue Sep 10, 2023 · 7 comments
Labels
question Further information is requested
Milestone

Comments

@OskarLebuda
Copy link

OskarLebuda commented Sep 10, 2023

Hi,
I’m not familiar with this lib so let me know if there are some answers for my questions

I found that I can use my homekit cameras (Aqara G2H Pro) into my custom app using this lib. But all of the docs told me that I have to known the homekit:// url. But... There is no information about "How to get homekit:// url".

Can someone tell me what should I do to get stream from my Aqara cameras into Go2RTC?
What should I do?
How to configure it?

I've tried to use docker image on mac to add my other camera (Eufy indoor cam) and I've got an error:
image

my config:

api:
  origin: "*"
streams:
  eufy1:
    - rtsp://username:password@192.168.1.33/live0
    - ffmpeg:eufy1#video=h264#hardware
    - ffmpeg:eufy1#audio=opus
homekit:
  eufy1:
    pin: 19550224
    name: Eufy cam
    device_id: eufy1
    device_private: eufy1

I really don't know if I doing it right so let me know.

Another problem is that docker on mac does not support network_mode: host so I proxy ports like:

version: "3.7"

services:
  go2rtc:
    container_name: cube-home-go2rtc
    image: alexxit/go2rtc:1.7.1
    privileged: true
    restart: unless-stopped
    ports:
      - 1984:1984
      - 8554:8554
      - 8555:8555
    environment:
      - TZ=Europe/Berlin
    volumes:
      - "./docker/go2rtc:/config"

Let me know if it's a problem for this lib

@AlexxIT AlexxIT added the question Further information is requested label Sep 11, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 11, 2023

  1. I'm not sure if HomeKit will work fine without network host.
  2. You should pair your camera with Home Assistant or go2rtc to get homekit link
  3. What exact model of your eufy camera?

@OskarLebuda
Copy link
Author

  1. I'm not sure if HomeKit will work fine without network host.
  2. You should pair your camera with Home Assistant or go2rtc to get homekit link
  3. What exact model of your eufy camera?
  1. Thats not a good info for me :( I think I have to buy some raspberry then.

I think all of the problem could be because I've use docker on mac.
I close this issue and figure out what can I do with raspberry and if something will not working - I'll open this issue.

Thanks for your help 🫶

@AlexxIT
Copy link
Owner

AlexxIT commented Sep 11, 2023

You can run go2rtc without docker (as binary)

@OskarLebuda
Copy link
Author

OskarLebuda commented Sep 11, 2023

@AlexxIT If i do like that i have an error from go2rtc:

19:33:26.360 INF go2rtc version 1.7.1 darwin/arm64
19:33:26.360 INF [api] listen addr=0.0.0.0:1984
19:33:26.360 INF [rtsp] listen addr=0.0.0.0:8554
19:33:26.360 INF [webrtc] listen addr=0.0.0.0:8555/tcp
19:33:26.360 DBG [hass] can't import config: open .storage/core.config_entries: no such file or directory
19:33:26.363 ERR github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:128 > error="no interfaces for listen"

maybe u know the reason?

@OskarLebuda OskarLebuda reopened this Sep 11, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 11, 2023

Interesting. I have another problem on my mac

20:53:16.858 INF go2rtc version 1.7.1 darwin/arm64
20:53:16.859 INF [api] listen addr=0.0.0.0:1984
20:53:16.859 INF [rtsp] listen addr=0.0.0.0:8554
20:53:16.859 INF [webrtc] listen addr=0.0.0.0:8555/tcp
20:53:16.863 ERR github.com/AlexxIT/go2rtc/internal/homekit/homekit.go:128 > error="listen udp4 0.0.0.0:5353: bind: address already in use"

@AlexxIT AlexxIT changed the title Homekit to go2rtc Fix support HomeKit server on macOS Sep 11, 2023
@OskarLebuda
Copy link
Author

OskarLebuda commented Sep 11, 2023

I also have this problem yesterday. Then I killed all listeners for port 5353 and got error that u've presents.
I killed it like

$ lsof -i tcp:5353
$ kill -9 PID_ID_OF_COMMAND_ABOVE

AlexxIT added a commit that referenced this issue Oct 11, 2023
@AlexxIT AlexxIT added this to the v1.7.2 milestone Oct 14, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 14, 2023

@AlexxIT AlexxIT closed this as completed Oct 14, 2023
felipecrs pushed a commit to felipecrs/go2rtc that referenced this issue Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants