Aqara G2H Pro in Frigate via HomeKit & Go2RTC

This one took me a while to figure out, I really think the docs are not clear enough for this scenario and there were just various pieces of info online which had to be brought together.

So, if you want an Aqara G2H Pro (or, I assume, any Aqara camera) in Frigate, here’s what needs to be done:

  1. Install the Frigate addon
  2. Install the Go2RTC addon
  3. Add the camera to the Aqara app
  4. Check HA for the camera now showing up as a HomeKit camera and add it
  5. In Go2RTC, go to Add - Home Assistant (I thought this was HUGELY confusing, because there is also a HomeKit section in Add which also sees the camera, but nope, the camera needs to be added as a “HomeKit camera from Home Assistant”, so it’s in the Home Assistant section) - just copy the location link from here “homekit://192.168…”
  6. In Go2RTC, go to Config and put this:
webrtc:  
  listen: ":8556"
  
rtsp:
  listen: ":8556"
  
streams:

  cameraname:
    - homekit://192.168... (the link you obtained in Step 5)

(the first thing moves the Web2RTC port from the default to 8556, because otherwise it will match the Frigate port and one of them will no longer start, the second thing creates an rtsp feed for the camera)

  1. Go to Frigate and in the Configuration Editor, the path for your camera should be “path: rtsp://YOURHAIP:8556/your camera name”

  2. Enjoy your new Frigate camera!

Hope it helps others, I didn’t go into the details of configuring Frigate or the Advanced Camera Card, as those I consider to be very clear on the project doc pages, but for this situation, points 5 & 6 took me hours to comprehend :slight_smile:

P.S. If anyone also needs the snapshot link for such a scenario, it’s http://YOURHAIP:1984/api/frame.jpeg?src=yourcameraname

Just logged in to say thank you for posting this, works perfectly.

Works for Aqara Doorbell G4 as well

1 Like

you sir are a godsend! Chatgpt was throwing me in circles trying to figure this out lol

1 Like

lol i did the same thing

Would i be able to use this camera to replace my presence sensor? Aqara FP2 doesnt quite work sometimes as it misses my presence while I was eating and lights went off…

Well, even if it worked perfectly for this purpose, I would never have a camera connected to a corporate cloud looking at me inside the house, a presence sensor would be much better for such a purpose - have you considered relocating the FP2? Because for the automation to turn the lights off it would have to not register your presence for more than a few seconds…I have the Aqara FP1 in the bathroom and it works fine for this purpose, but I did adjust its position after some initial trial and error.