The Aqara Camera Hub G2H Pro combines a 1080p indoor camera with an Aqara Zigbee hub. You can bring its HomeKit video into a local go2rtc and Frigate setup, but the RTSP address in that arrangement belongs to go2rtc, not the camera.
This guide follows the practical route: provision the camera’s Wi-Fi, pair it to Home Assistant’s HomeKit Device integration, let go2rtc import that pairing, and feed go2rtc’s RTSP output to Frigate. It also covers an alternative using Frigate’s bundled go2rtc, local storage, hub limitations and an internet-block test.
Disclosure: Some links in this article may be affiliate links. We may earn a small commission at no extra cost to you.
What local streaming means for the G2H Pro
HomeKit live video is a local camera protocol. HomeKit Secure Video is Apple’s separate recording service; an iCloud subscription and Apple home hub are not prerequisites for go2rtc to receive a HomeKit live stream.
Do not look for a native, app-generated RTSP URL on the G2H Pro as the basis of this guide. Aqara’s product documentation lists HomeKit and local storage, and its product-team response on older G2H Pro/G3 cameras discusses RTSP as a possible future firmware feature. That does not establish an existing native RTSP feature for this model. The method here uses go2rtc’s HomeKit client to produce the RTSP endpoint.
- HomeKit live video: Camera → local HomeKit client → go2rtc restream. Pairing credentials are required.
- Frigate recording: Frigate reads the local restream and writes to storage you configure.
- Aqara/Apple online services: Aqara remote viewing, event uploads and Apple iCloud recording are separate choices. A working LAN stream does not show that these services or other outbound connections have stopped.
Configure storage and cloud features deliberately, then test the camera with its WAN access blocked. Do not infer that an Aqara account-bound camera has no outbound traffic merely because you view it through HomeKit.
Hardware and software prerequisites
- An Aqara Camera Hub G2H Pro; the Camera E1 is a different model.
- A 2.4 GHz Wi-Fi network and the camera’s printed HomeKit setup code.
- Home Assistant and a working HomeKit Device integration.
- go2rtc, either standalone or bundled with Frigate. For the HA-import route, it must be able to read Home Assistant’s configuration files.
- Frigate with sufficient recording storage and suitable decoding/detection resources. A Coral is one supported detector option, not a requirement for every installation.
- An MQTT broker shared by Frigate and Home Assistant when using the Frigate HA integration.
Home Assistant OS can run the relevant apps/add-ons; a container installation can run go2rtc and Frigate separately. Start from working installations of these services. Camera pairing and the HA integration are distinct from installing the Frigate app.
Initial Wi-Fi setup and account choices
The camera must first join Wi-Fi. An Aqara account is one setup route, rather than an unavoidable requirement for every HomeKit installation.
- Power the camera and provision its 2.4 GHz Wi-Fi using Aqara Home’s G2H Pro setup flow, or Apple’s Home app on an iPhone/iPad with the printed HomeKit code. Follow the camera’s reset/setup prompts for your unit if it was previously configured.
- If using Aqara Home with an account, review event/cloud storage, remote access and other online features in the camera settings. Disable the ones you do not want. Do not assume a microSD card automatically disables event uploads.
- If Apple Home provisioned the camera, remove the camera accessory from Apple Home before pairing it to HA. Leave the camera on Wi-Fi; a factory reset may erase that network setup and require starting again.
- Reserve the camera’s IP address in DHCP. Keep the printed setup code; a code shown by an app is not the only place to obtain it.
Aqara’s HomeKit Mode documentation describes maintenance and child-device settings for devices used with Apple Home, without Aqara automation/scene configuration. Availability and camera-specific settings vary. Choose account binding for the features you need, rather than treating account creation as a prerequisite for the local video protocol.
Start pairing on a simple, reachable LAN. Move to restrictive IoT VLAN rules after the stream works; otherwise a discovery problem can look like a camera fault.
Adding the G2H Pro to Home Assistant through HomeKit Device
- In HA, open Settings → Devices & services → Add integration → HomeKit Device. This receives accessories; HomeKit Bridge exports HA devices in the other direction.
- Select the unpaired G2H Pro discovered on your network and enter its HomeKit setup code.
- If it is missing, check that another HomeKit controller does not still own its pairing. Then check mDNS discovery and direct connectivity between HA and the camera.
- Inspect the integration’s entities and test a camera snapshot. HA’s HomeKit camera implementation provides snapshots; the live-video path in this guide comes from go2rtc. The exact camera, motion and bridged-child entities depend on the accessory’s advertised services.
A HomeKit accessory is normally paired to one ecosystem at a time. The next step shares HA’s existing pairing with go2rtc; it does not pair the camera independently to a second controller. If you want Apple Home access as well, a deliberate proxy/export arrangement is needed. Do not keep trying the same setup code in three controllers.
The HomeKit Device documentation covers discovery and pairing; the HA camera implementation shows the snapshot function. HomeKit stream credentials are more than the camera’s address and device ID, so a manually guessed homekit:// URL will not authenticate.
Configuring go2rtc to pull the HomeKit stream
For the main route, use a standalone go2rtc instance that can read HA’s config directory. The official HA go2rtc add-on already has the appropriate access. For a separate container, mount HA’s configuration directory read-only and point hass.config at that mounted path. Do not point it at Frigate’s unrelated config directory.
- Open go2rtc’s web interface, usually on port
1984, through its add-on ingress or a trusted LAN address. - Open Add → Home Assistant and find the HA-paired camera’s row. If no HA sources appear, check access to the HA config files and restart go2rtc after the pairing.
- Copy its
urlvalue, which starts withhass:, into astreams.g2h_proentry in go2rtc’s configuration editor. Save the configuration and restart/reload go2rtc as prompted. Use the exact imported name; it is not necessarily the camera’s entity ID. - Open that stream in go2rtc and confirm video before adding Frigate.
A minimal import-based configuration looks like this. Replace Camera-Hub-G2H-Pro-AB12 with the imported integration name:
hass:
config: /config
streams:
g2h_pro:
- "hass:Camera-Hub-G2H-Pro-AB12"
For a container, /config above must actually be the mounted HA directory. The add-on does not require a custom hass.config value. Import reads the saved HomeKit pairing data; you do not need to open HA’s storage files and copy private keys by hand.
HomeKit audio can require transcoding for ordinary players. Add FFmpeg audio sources only if you need them, and test the resulting codecs. A standalone configuration with audio conversion is:
hass:
config: /config
streams:
g2h_pro:
- "hass:Camera-Hub-G2H-Pro-AB12"
- "ffmpeg:g2h_pro#audio=aac#audio=opus"
api:
listen: ":1984"
rtsp:
listen: ":8554"
webrtc:
listen: ":8555"
go2rtc normally uses TCP 1984 for its UI/API, TCP 8554 for RTSP and TCP/UDP 8555 for WebRTC. Host mappings may differ. Keep these interfaces private to trusted clients; the restream and pairing-bearing configuration should not be published on the internet.
The HA import documentation and HomeKit source documentation describe this relationship. They document the mechanism; they do not certify every G2H Pro firmware or guarantee uninterrupted streaming on your network.
Wiring go2rtc into Frigate
With standalone go2rtc, Frigate’s input is the go2rtc host’s reachable RTSP address. 127.0.0.1 would refer to Frigate’s own container, so use it only when the stream server is actually inside that same container.
Merge this camera block into your existing Frigate config. Replace GO2RTC_LAN_IP with the standalone host’s address, and keep your existing MQTT, detector and hardware-acceleration settings. This example records video without audio:
cameras:
g2h_pro:
ffmpeg:
inputs:
- path: "rtsp://GO2RTC_LAN_IP:8554/g2h_pro?video"
input_args: preset-rtsp-restream
roles:
- detect
- record
detect:
fps: 5
record:
enabled: true
motion:
days: 7
snapshots:
enabled: true
retain:
default: 7
objects:
track:
- person
- cat
The recording syntax follows the current Frigate recording documentation. Validate it in the editor for your installed version before restarting; older releases use different retention fields. Check the actual stream dimensions in go2rtc before setting an explicit detection resolution. Lower detection resolution/FPS and hardware decoding can reduce processing work; a detector accelerator does not eliminate video-decoding cost.
Alternative: bundled go2rtc. If you prefer one go2rtc instance inside Frigate, return to standalone go2rtc’s Add → Home Assistant table and copy the camera row’s location value. This is the full authenticated homekit:// source, distinct from the short hass: value in its url column. Preserve every generated query parameter and use it under Frigate’s go2rtc.streams. The placeholder below must be replaced with that complete source:
go2rtc:
streams:
g2h_pro:
- "PASTE_FULL_IMPORTED_HOMEKIT_SOURCE_HERE"
cameras:
g2h_pro:
ffmpeg:
inputs:
- path: "rtsp://127.0.0.1:8554/g2h_pro?video"
input_args: preset-rtsp-restream
roles:
- detect
- record
Carry over the recording, detection and snapshot settings from the main example. Stop the standalone stream after the bundled source works; do not run duplicate HomeKit consumers unnecessarily. Keep a private backup of the generated source, since it contains pairing credentials. A later re-pair changes those credentials and requires a fresh import.
After video and recordings work in Frigate, configure MQTT to the same broker HA uses, install the separate Frigate Home Assistant integration through HACS, restart HA and add Frigate with a reachable server URL. Follow its authentication instructions for your deployment. This adds Frigate cameras, detection entities and recording access; it does not convert the existing HomeKit camera entity into Frigate automatically.
Using the G2H Pro’s Zigbee hub locally
The built-in hub can host supported Aqara Zigbee devices. Aqara advertises up to 128 child devices, with router/repeater conditions for larger networks. The bridge exposes supported child-device functions through HomeKit; it does not make every Aqara attribute available in HA.
Add a child using the camera’s supported child-pairing flow, then check whether the HA HomeKit Device integration exposes it. Test both the sensor state and any required control. Firmware, model support and HomeKit mappings matter, so do not assume that every lock, switch or cover will appear with all features.
There is no general built-in “Aqara local API” integration in HA that you can select as a second G2H Pro route. Community integrations and gateway modifications have specific support lists; they are separate projects, not a documented universal API on this camera.
ZHA and Zigbee2MQTT also cannot use the G2H Pro as an ordinary supported coordinator. If you want to manage devices directly in either system, use a supported separate coordinator and pair the child devices to it instead. A Zigbee device cannot remain joined to both networks simultaneously.
For the wider hub choice, see Aqara Hub M2 versus M3 for local control.
Local SD card recording and NAS options
The G2H Pro product page lists microSD support up to 512 GB and a native Samba NAS option. Its NAS option requires a microSD card. Configure the camera’s storage and schedule in its supported app flow, and verify playback and NAS writes afterwards. This native file-storage feature is separate from an RTSP stream consumed by an NVR.
Frigate offers another storage route: it records the go2rtc video on its own host. The camera’s microSD recording can provide a fallback if that host is unavailable. Check both paths rather than assuming a successful Frigate stream also proves SD recording is running.
For Docker, mount your storage at /media/frigate in the Frigate container. After mounting the NAS share on the Docker host, merge a volume mapping such as this into your existing Compose service:
services:
frigate:
volumes:
- /mnt/nas/frigate:/media/frigate
Replace the host path with your actual mounted directory and ensure it is writable by Frigate. Keep the rest of your service definition. Recordings live under /media/frigate/recordings; storage location is not a record.path setting. Confirm the NAS mount is present before starting Frigate so recordings do not silently fill the host disk instead.
For the HA OS Frigate app, stop Frigate, back up/move any existing /media/frigate data using the official migration instructions, then open Settings → System → Storage → Add network storage. Name the share frigate, choose Media, supply the NAS connection details, restore any retained data to the mounted location and restart Frigate. Check a new recording. The Frigate network-storage guide covers existing databases/data; avoid editing HA OS’s /etc/fstab.
Network isolation: blocking cloud after setup
Once the full chain works, apply a router rule that denies the camera’s access to the WAN while allowing the local HA/go2rtc host, discovery and any local services it needs. Cover IPv6 as well as IPv4 if your network uses both. An IoT VLAN needs mDNS forwarding and the actual unicast video/control connections; allowing multicast discovery alone is insufficient.
Test live video, Frigate recording, a bridged child device and a camera reboot with the block enabled. Test each workflow separately. Aqara remote access, online storage and updates can stop working, and behavior may differ by firmware. If a local function fails, inspect the blocked connection and restore access temporarily to identify its dependency.
DNS filtering can help identify and limit connections, but does not replace a WAN firewall rule. For example, the following are Pi-hole regular-expression deny rules for the named domains and their subdomains, not a verified complete G2H Pro endpoint list:
(^|\.)aqara\.com$ (^|\.)lumiunited\.com$
Use the resolver’s own rule syntax and restrict a test group to the camera. Queries can be cached or connections can use IP addresses, so an empty DNS log does not prove that all outbound traffic has stopped. Router connection/firewall logs provide better evidence of destinations and attempted traffic; encrypted payloads are not readable simply from those logs.
Troubleshooting
- Camera missing from HomeKit Device: Check Wi-Fi, mDNS reachability and whether it remains paired to Apple Home or another controller. Remove the old pairing before attempting a new one; reset only when necessary.
- No Home Assistant source in go2rtc: Check that go2rtc can read HA’s config directory, including its saved integration data. Restart go2rtc after the HA pairing. A shared network alone does not give it access to those files.
- Authentication fails: Re-import after a re-pair. A device ID and IP address without client/private-key and device-key data are insufficient.
- go2rtc works but Frigate cannot connect: Verify the host and exposed RTSP port from Frigate’s network. Use the external host for standalone go2rtc and localhost for bundled go2rtc. Check firewall rules and stream spelling.
- Video works but audio fails: Inspect the codecs and test the optional FFmpeg transcode. Keep the video-only Frigate path working before adding audio recording.
- Port conflict: Two containers may use the same internal port, but cannot both publish it on the same host address/port. Choose one intended restream server or change host mappings; a URL in the
go2rtcconfig does not disable Frigate’s bundled server. - Stream fails after a restart: Check reachability, DHCP address, HomeKit discovery and go2rtc logs first. Routine HA restarts should not require deleting the saved pairing. Avoid re-pairing as a first response, since it changes the imported credentials.
- Child device missing: Confirm it is joined to this camera and supported for HomeKit bridging. Check the services HA discovered instead of opening an undocumented “local API” port.
Recommendation
If you already own a G2H Pro, the HomeKit → go2rtc → Frigate route can put its video to work with local recording and detections. Get the pairing and one restream working first, then add Frigate and test your firewall rules. That is more configuration than a camera with a documented native RTSP endpoint, so weigh it before buying hardware specifically for an NVR.
The hub can be useful for supported Aqara child devices, but it is a bridge rather than a replacement for a Z2M coordinator. Keep that choice separate from whether you like the camera.
Related reading: Aqara FP2 for zone-based presence detection and Aqara privacy and local-mode options.
