The Aqara G2H Pro is one of the few affordable indoor cameras that doubles as a Zigbee hub — and with the right setup, you can get a fully local camera stream into Home Assistant without routing a single frame through Aqara’s cloud. The trick is that the G2H Pro doesn’t speak raw RTSP by default. It speaks HomeKit. Once you understand that, the path becomes clear: G2H Pro → HomeKit (local) → go2rtc → Frigate → Home Assistant.
This guide walks through that exact chain. If you’re already running Home Assistant with Frigate and you want to add the G2H Pro without compromising your local-only posture, you’re in the right place.
Disclosure: Some links in this article may be affiliate links. We may earn a small commission at no extra cost to you.
What “Local” Actually Means for the G2H Pro
Before touching any config, set the right expectations about what you’re getting.
The G2H Pro has three distinct streaming modes, and only one of them matters for local Home Assistant use:
- HomeKit stream (local): When the camera is paired to HomeKit, it exposes a HomeKit Secure Video (HKSV) stream on your local network. This does not require Aqara cloud once pairing is complete. go2rtc can pull this stream directly.
- RTSP (app-generated, token-based): The Aqara Home app can generate an RTSP URL for the G2H Pro under camera settings. This URL includes an authentication token that changes after firmware updates or re-pairing — making it a less reliable long-term path than HomeKit for a permanent Frigate setup. Useful for a one-off stream, but not recommended as a foundation.
- Aqara cloud recording: The default “clip to cloud” behavior. Disable this in the Aqara app before finalizing setup. By default, the camera sends short event-triggered clips to Aqara’s servers even with a microSD inserted — turn that off explicitly.
The Zigbee hub functionality — up to 128 Zigbee 3.0 devices — is entirely independent of the camera stream. Home Assistant’s HomeKit Controller integration exposes Zigbee child devices paired to the G2H Pro as HA entities, without requiring Aqara cloud after initial pairing. The Aqara native integration (local API mode) also works for this. One important constraint: the G2H Pro’s Zigbee coordinator is embedded in the camera hardware, not a removable USB stick. ZHA and Zigbee2MQTT cannot use it as a USB coordinator — more on that below.
Bottom line: once the initial Aqara app pairing and HomeKit setup are done, and cloud recording is disabled, the app can be sidelined. The camera streams and Zigbee hub operate on your LAN without phoning home.
Hardware and Software Prerequisites
Hardware:
- Aqara Camera Hub G2H Pro (E1 model)
- Home Assistant instance (OS or Supervised recommended for add-on support)
- Optional: Google Coral USB Accelerator for Frigate hardware detection
Software / Add-ons:
- go2rtc — either the standalone add-on or the version bundled with Frigate 0.12+
- Frigate — NVR add-on for detection and recording
- Home Assistant HomeKit integration (built-in, no HACS needed)
You don’t need the Aqara app long-term, but you need it once for initial device setup and HomeKit pairing code retrieval.
Initial Aqara App Setup (Required Once)
The Aqara app is the only cloud-touching step. Keep it minimal.
- Install the Aqara Home app on a phone. Create an account if you don’t have one — this is unavoidable for first-time pairing.
- Add the G2H Pro to the app. Follow the in-app instructions (camera scans a QR code on your phone, joins your Wi-Fi).
- Once added, go to Settings → HomeKit inside the camera’s device page. Enable HomeKit and note the 8-digit pairing code.
- Recommended: disable Aqara cloud recording in the camera’s storage settings at this point. Also disable any “event clip upload” toggle you find — these send clips to Aqara’s servers even if you have a microSD inserted.
After this, the Aqara app is optional. Firmware updates require the app, so don’t uninstall if you want those. Otherwise, you’re done with Aqara’s ecosystem.
Network strategy: If you’re running a VLAN for IoT devices, add the G2H Pro to it now. After HomeKit pairing is confirmed working, you can implement firewall rules to block outbound internet for the camera’s IP. See the network isolation section below.
Adding G2H Pro to Home Assistant via HomeKit Integration
Home Assistant has a native HomeKit integration (not HomeKit Bridge — that’s the reverse direction). This is what lets HA receive data from HomeKit accessories.
- In HA, go to Settings → Devices & Services → Add Integration and search for HomeKit.
- HA will scan your network for HomeKit accessories. The G2H Pro should appear. If it doesn’t, ensure your HA host and the camera are on the same subnet (or mDNS is working across VLANs).
- Enter the 8-digit pairing code from the Aqara app.
- Once paired, HA creates entities for the camera stream, motion sensor, doorbell button (if applicable), and camera status.
Confirming local traffic: Run Wireshark or check your Pi-hole DNS logs during pairing and shortly after. HomeKit streams between HA and the G2H Pro are LAN-only — you should see traffic between HA’s host IP and the camera’s IP, with no outbound Aqara domain lookups during streaming. Any Aqara cloud traffic at this point is from cloud features you haven’t disabled yet (event clips, status pings) — address those in the network isolation section.
The camera entity will appear in HA, but the stream is low-latency HomeKit video — useful for the HA dashboard, but not yet wired into Frigate for detection and recording. That’s what go2rtc handles.
Configuring go2rtc to Pull the HomeKit Stream
go2rtc is the bridge between the G2H Pro’s HomeKit stream and the rest of your stack. It ingests HomeKit video and re-publishes it as RTSP, WebRTC, or MSE — formats that Frigate and HA’s camera card can consume natively.
go2rtc add-on installation: If you’re running Frigate 0.12+, go2rtc is bundled and you configure it within Frigate’s config. If you want go2rtc standalone, install it from the HA add-on store.
Finding the HomeKit stream URL: The homekit:// source in go2rtc uses the camera’s local IP plus the device ID from HomeKit pairing. The format is:
streams:
g2h_pro:
- homekit://192.168.1.XX?device_id=AA:BB:CC:DD:EE:FF
Replace 192.168.1.XX with the camera’s local IP and AA:BB:CC:DD:EE:FF with the HomeKit device ID.
Easiest way to get the correct URL: In go2rtc’s web UI (port 1984), click Add and select the Home Assistant section — not the HomeKit section. go2rtc will import the already-paired HomeKit devices from HA and pre-populate the correct homekit:// URL including device ID. This avoids manually hunting through HA’s device registry. If you need the device ID manually, find the G2H Pro under Settings → Devices in HA and look for the HomeKit identifier in the device properties.
Port notes: go2rtc uses several ports by default:
1984— go2rtc web UI and API8554— RTSP server8555— WebRTC TCP/UDP
If you’re running go2rtc as a Supervisor add-on, these ports may be offset. Check the add-on’s Network tab for the actual mapped ports. Frigate’s config will need to reference the correct internal port (usually the default if Frigate bundles go2rtc internally).
Full go2rtc config example:
streams:
g2h_pro:
- homekit://192.168.1.XX?device_id=AA:BB:CC:DD:EE:FF
api:
listen: ":1984"
rtsp:
listen: ":8554"
webrtc:
listen: ":8555/tcp"
Save this as go2rtc.yaml in your HA config directory (or use the add-on’s YAML editor). Restart go2rtc and verify the stream loads in the go2rtc web UI before wiring it into Frigate.
Wiring go2rtc into Frigate
Once go2rtc is serving the G2H Pro stream, Frigate treats it like any other RTSP source.
frigate.yml camera config:
cameras:
g2h_pro:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/g2h_pro
roles:
- detect
- record
detect:
width: 1920
height: 1080 # G2H Pro is 1080p; confirm actual stream dimensions in go2rtc web UI before setting
fps: 5
record:
enabled: true
retain:
days: 7
mode: motion
snapshots:
enabled: true
retain:
default: 7
motion:
mask: [] # add coordinate masks if needed
objects:
track:
- person
- cat
A note on roles: Assigning both detect and record to the same stream input works for most setups. If you have a Coral TPU and want to reduce CPU load, split into two inputs — one sub-stream for detect (lower res) and one full-res for record. The G2H Pro’s HomeKit source via go2rtc exposes a single stream; a reliable secondary sub-stream is not available from this camera over HomeKit. For Coral-accelerated setups, you’ll likely run detection on the full 1080p stream and accept slightly higher CPU overhead, or reduce the detect width/height to downsample.
Once frigate.yml is saved and Frigate restarted, the G2H Pro camera entity in HA will populate with Frigate’s enriched stream — motion events, person detections, clip history. The stream never leaves your network.
Using the G2H Pro’s Zigbee Hub Locally
The G2H Pro’s built-in Zigbee coordinator is a sleeper feature. It supports up to 128 Zigbee 3.0 devices — sensors, switches, locks, covers.
You have two options for integrating the Zigbee hub with Home Assistant:
Option A — HomeKit Controller (simplest): Once the camera is paired to HA via HomeKit, Zigbee child devices paired to the G2H Pro appear as HA entities automatically. No additional integration needed. This works locally without cloud dependency after initial pairing.
Option B — Aqara’s native HA integration (local API): The Aqara integration in HA can communicate with the G2H Pro’s hub locally over LAN. Pair Zigbee child devices via the Aqara app first, then expose them to HA via the integration. This gives access to more device-specific attributes than HomeKit exposes.
Not applicable — Zigbee2MQTT or ZHA via USB: The G2H Pro’s Zigbee coordinator is integrated into the camera hardware — it’s not a removable USB stick and cannot be used as a USB coordinator for ZHA or Zigbee2MQTT. If you want ZHA/Z2M for Aqara devices, you need a separate USB coordinator (e.g., Home Assistant SkyConnect or Sonoff Zigbee 3.0 USB Dongle Plus).
For a comparison of G2H Pro versus dedicated Aqara hubs (M2, M3) for Zigbee capacity and local control, see our guide on Aqara Hub M2 vs M3 for local control →.
Local SD Card Recording and NAS Options
The G2H Pro accepts a microSD card (up to 512GB) for onboard recording. This is entirely local — no cloud account required.
SD card recording is configured in the Aqara app. Set it to continuous or motion-triggered. Footage stays on the card.
Frigate vs SD card:
- Frigate gives you searchable, object-tagged clips, direct HA integration, and optional NAS/network storage.
- SD card gives you a physical fallback that survives HA downtime.
Running both in parallel is reasonable: Frigate handles detection and alerting; the SD card keeps raw footage if Frigate’s storage is full or HA restarts.
For NAS/Samba recording via Frigate, configure the record path in frigate.yml to point to a mounted network share:
record:
enabled: true
retain:
days: 14
mode: motion
# Map /media/frigate_clips to a Samba share via HA's /etc/fstab or Network Storage add-on
Network Isolation: Blocking Cloud After Setup
Once the Aqara app setup and HomeKit pairing are complete, you can cut the G2H Pro’s outbound internet access without affecting the local stream or Zigbee hub.
DNS block (Pi-hole / AdGuard Home): Add Aqara’s cloud domains to your blocklist. Domains commonly observed in G2H Pro traffic (confirm via Wireshark on your own unit — exact domains may vary by firmware region):
*.aqara.com
*.lumiunited.com
aiot-coap.aqara.com
Firewall/VLAN rule (harder block): If the camera is on an IoT VLAN, add a rule denying outbound traffic from the camera’s IP to 0.0.0.0/0 except for your HA host and your local DNS resolver. This ensures HomeKit LAN traffic still works while blocking cloud endpoints.
Validation: After applying the block, run the stream in HA for 10 minutes and check Pi-hole’s query log. You should see blocked queries for Aqara domains with zero effect on the video stream. If the stream drops, temporarily remove the block and check which domain the camera actually needs — some firmware features (NTP, firmware updates) use Aqara’s infrastructure.
Troubleshooting
HomeKit pairing not completing in HA:
- Ensure the G2H Pro and HA host are on the same subnet or mDNS is bridged across VLANs (Avahi/mdns-repeater).
- Reset the HomeKit pairing in the Aqara app and try again — the camera can only pair to one HomeKit controller at a time.
go2rtc stream not starting:
- Check go2rtc logs in the add-on panel. A
connection refusedsuggests the wrong IP or device_id. - Verify the camera is reachable from the HA host:
ping 192.168.1.XXfrom the HA terminal. - Try the go2rtc web UI (
http://HA_IP:1984) and click the stream name to test directly before involving Frigate.
Frigate port conflicts:
- If go2rtc is running standalone AND bundled inside Frigate, you’ll get port conflicts on 8554. Pick one: either disable the standalone add-on and configure go2rtc inside Frigate’s config, or disable Frigate’s bundled go2rtc by pointing Frigate’s
go2rtcconfig block to an external URL (http://127.0.0.1:1984).
HomeKit stream drops after HA restart:
- The HomeKit integration sometimes needs a manual re-pair after a clean HA restart. Check the integration’s status under Settings → Devices & Services. If it shows “unavailable”, remove and re-add using the same pairing code. Whether the G2H Pro HomeKit session reliably persists across HA restarts depends on firmware version — this is inconsistent across units in community reports.
Zigbee devices not appearing in HA after Aqara integration setup:
- Ensure the G2H Pro and HA are on the same VLAN (or the Aqara local API port is reachable from HA). The local API port used by the G2H Pro hub is not officially documented by Aqara — port 4003 is commonly cited in community setups but treat this as unverified; check your router’s connection table for the actual port if the integration fails to discover devices.
Recommendation
The G2H Pro earns its place in a local-first HA setup because the camera and hub functions genuinely work without cloud once you’ve run through the initial app pairing. The HomeKit → go2rtc → Frigate chain is slightly more complex than a native RTSP camera, but it’s stable and gives you full Frigate feature parity.
The Zigbee hub is a real bonus if you’re running Aqara Zigbee sensors. Getting a 2-in-1 (camera + hub) at the G2H Pro’s price point makes the extra go2rtc config step worth it.
If you’re already running presence detection alongside cameras, the Aqara FP2 pairs well with this setup → for zone-level detection without relying on camera-based person detection.
For context on why keeping Aqara cloud out of the loop matters beyond convenience, see our breakdown of Aqara’s privacy posture and local mode options →.