[Tutorial] Integrating Aqara G3 into Home Assistant with Video + PTZ

Here is a step-by-step guide on how to integrate the Aqara Camera Hub G3 into Home Assistant. This covers the basic HomeKit integration as well as advanced features (PTZ control) using the AqaraPOST add-on (third-party / by sdavides / not by Aqara).

1. Initial Setup in Aqara Home

The device should be initialised in the Aqara Home app before connecting to Home Assistant.

  1. Open the Aqara Home App.
  2. Tap the + icon (top right corner) → Add Accessory → Camera Hub G3.
  3. Follow the on-screen instructions.
  4. Enter your Wi-Fi credentials.
  5. Scanning the QR Code: The app will generate a QR code to show to the camera.

Tip: If you have trouble getting the camera to scan the QR code from your phone screen, take a screenshot of the code and display it on a larger monitor. This immediately resolves the scanning issue for me.


2. Integration via HomeKit

Once the Camera Hub G3 has been set up, it will be integrated into Apple Home and will need to be removed again for the time being.

To remove it, open the Apple Home app, go to Accessory Settings and select Remove Camera from Home.

Then please check your Home Assistant:

  1. Open Home Assistant.
  2. Navigate to Settings → Devices & Services.
  3. The G3 should be automatically discovered by the HomeKit Device integration.
    If not discovered: Click “Add integration” → Search for “Apple”
    → Select “Apple” and “HomeKit Device”
  4. Enter the HomeKit Pairing Code found on the base of the camera.

3. Enable Advanced Features (PTZ & Controls)

To get PTZ (Pan/Tilt/Zoom) controls and better streaming, we will use a custom Add-on.

Prerequisites

Home Assistant Community Store (HACS) must be installed.
Installation Guide

Step 3.1 - Install Dependencies

  1. Open HACS in Home Assistant.
  2. Search for and download the following two integrations:
    • WebRTC Camera
    • Node-RED Companion
  3. Restart Home Assistant if prompted.

Step 3.2 - Install the AqaraPOST Add-on

  1. Go to SettingsAdd-onsAdd-on store (Button).
  2. Click the three dots (top right) → Repositories.
  3. Add the following URL:
    https://github.com/sdavides/AqaraPOST-Homeassistant
  4. Click + Add.
  5. Find the new Add-on in the list and click Install (Button).
  6. Optional: Enable “Start on boot” and “Watchdog”.

4. Obtaining the Device ID (“did”) & Configuration

To configure the Add-on, you need the unique did of your camera.
You can obtain this in two ways:

Option A: Manual Entry (via MAC Address)

You can find the MAC address of your camera via your router interface or in the Aqara Home app under Device settingsNetwork Information

Then you can construct the did yourself. The format is simply lumi1. followed by the MAC address in lowercase and without colons.
Format: lumi1.macaddress
Example: If your MAC is 54:EF:44:11:22:33, your did is lumi1.54ef44112233.

Option B: Retrieval via Docker Script

If you do not know the MAC address or would prefer to retrieve the exact token, you can use a Docker script.

  1. Install Docker Desktop on your computer Download Link
  2. Create a file named docker-compose.yml with the following content:
services:
  aqara-generator:
    image: python:3-alpine
    container_name: aqara_token_gen
    stdin_open: true
    tty: true
    command: >
      sh -c "apk add --no-cache build-base
      && pip install requests pycryptodome requests-toolbelt
      && wget -q https:\\[remove]raw.githubusercontent.com/sdavides/AqaraPOST-Homeassistant/main/generatejson/AqaraPOST-tokenGenerator.py -O /tmp/TokenGenerator.py
      && ch[remove]mod +x /tmp/TokenGenerator.py
      && python3 /tmp/TokenGenerator.py"

Note: Please remove the text [remove]

  1. Open your Terminal/Command Prompt, navigate to the folder containing the file, and run: docker compose run --rm aqara-generator
  2. Wait for dependencies to install.
  3. Enter your Aqara Email/Username, Password, and Region when prompted.
  4. The script will list your devices. Look for your G3 Camera.
  5. Copy the value under did (e.g., lumi1.xxxxxxxxxxxx).

Security Disclaimer: I have reviewed the script at the time of writing, and it sends login data as a hash only to Aqara servers. However, as this is a third-party script, I cannot guarantee future safety. You can audit the code yourself here: AqaraPOST-tokenGenerator.py

Final Step: Configure the Add-on

  1. Back in Home Assistant.
  2. Go to the Configuration tab of the installed AqaraPOST Add-on.
  3. usernameAqara: Your Aqara email.
  4. passwordAqara: Your Aqara password.
  5. Lumi1Aqara G3 camera: Paste the did (from Option A or Option B).
  6. serverAqara: Select your region. For example: “EU”
  7. timezoneAqara: Select your timezone. For example: “de-DE”
  8. Click Save and start the Add-on.

5. Creating the Dashboard Card

To view the stream and control the camera, add a custom card to your dashboard.

  1. Go to your Dashboard → Edit Dashboard.
  2. Choose Add Card (plus symbol)
  3. Scroll down to Manual.
  4. Paste the following YAML configuration:
type: picture-elements
camera_image: camera.camera_hub_g3_1765
camera_view: auto
elements:
  - type: custom:webrtc-camera
    entity: camera.camera_hub_g3_1765
    style:
      top: 50%
      left: 50%
      width: 100%
      height: auto
      z-index: 0
    ui: false
  - type: state-icon
    entity: binary_sensor.camera_hub_g3_1765_motion_sensor
    style:
      left: 25px
      bottom: 0px
  - type: icon
    icon: mdi:arrow-up
    style:
      background: rgba(255, 255, 255, 0.25)
      right: 25px
      bottom: 50px
      z-index: 1
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.camera_g3_ptz_up
  - type: icon
    icon: mdi:arrow-down
    style:
      background: rgba(255, 255, 255, 0.25)
      right: 25px
      bottom: 0px
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.camera_g3_ptz_down
  - type: icon
    icon: mdi:arrow-left
    style:
      background: rgba(255, 255, 255, 0.25)
      right: 50px
      bottom: 25px
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.camera_g3_ptz_left
  - type: icon
    icon: mdi:arrow-right
    style:
      background: rgba(255, 255, 255, 0.25)
      right: 0px
      bottom: 25px
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.camera_g3_ptz_right
  - type: icon
    icon: mdi:arrow-collapse-all
    style:
      background: rgba(255, 255, 255, 0.25)
      right: 25px
      bottom: 25px
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.camera_g3_ptz_center

You must replace the entity IDs in the code above with the actual names generated in your system:

  • Replace camera.camera_hub_g3_1765 with your camera entity.
  • Replace binary_sensor.camera_hub_g3_1765_motion_sensor with your motion sensor entity.
  • The button entities (e.g., button.camera_g3_ptz_up) usually follow a standard naming convention, but check your Developer Tools if they differ.

Once saved, you should see the live camera feed with an overlay of arrow keys for PTZ control and a motion sensor icon that changes color when movement is detected.

6. (Optional) Re-adding the Camera to Apple Home

Since Home Assistant “claimed” the direct HomeKit connection in Step 2, the camera is no longer visible in Apple Home. To use it in both Home Assistant and Apple Home, you must bridge it back.

  1. In Home Assistant, go to SettingsDevices & Services.
  2. Click Add Integration
  3. Search for HomeKit Bridge
  4. Select AppleHomeKit Bridge.
  5. In “Select domains to be included” choose the Camera
  6. Click Submit. Read the instructions. Click Submit again.
  7. Give the HomeBridge a name. Optionally, select an area. Click Finish.
  8. Check the Notifications (sidebar, bottom left) in Home Assistant.
    A new QR code will be generated.
  9. Open the Apple Home AppAdd Accessory
  10. Scan the QR code or enter the numerical code.
  11. You will likely see a warning stating “Uncertified Accessory” (since it is running through a software bridge). Tap Add Anyway to proceed.

The camera will now be available in Apple Home while remaining fully integrated into Home Assistant.

Appendix: List of Entities

Once the integration is complete, multiple entities will be created in Home Assistant. Below are examples of the primary entities for the Camera Hub G3. Since I also configured an Aqara FP2 Presence Sensor using this method, I have included those entities in the list as well. Please note that the ID suffixes (e.g., _1765) will be unique to your specific device setup.

  • camera.camera_hub_g3_1765 (Main Video Feed)
  • binary_sensor.camera_hub_g3_1765_motion_sensor (Motion Detection)
  • button.camera_g3_ptz_left (PTZ Control: Move Left)
Click here for the full list of G3 and FP2 entities.
  • sensor.camera_g3_config (Camera G3 config)
  • button.camera_g3_info (Camera G3 Info)
  • button.camera_g3_config (Camera G3 config)
  • sensor.aqara_smart_log_autom (Aqara Smart log Autom)
  • button.aqara_smart_log_autom (Aqara Smart log Autom)
  • button.camera_g3_ptz_left (Camera G3 PTZ left)
  • button.camera_g3_ptz_right (Camera G3 PTZ right)
  • button.camera_g3_ptz_up (Camera G3 PTZ up)
  • button.camera_g3_ptz_down (Camera G3 PTZ down)
  • switch.camera_g3_video_active (Camera G3 video active)
  • switch.camera_g3_human_tracking (Camera G3 Human tracking)
  • switch.camera_g3_pets_tracking (Camera G3 Pets tracking)
  • switch.camera_g3_face_detection (Camera G3 Face Detection)
  • switch.camera_g3_gesture_identification (Camera G3 Gesture Identification)
  • switch.camera_g3_motion_detection (Camera G3 Motion Detection)
  • switch.camera_g3_suond_detection (Camera G3 Suond Detection)
  • switch.camera_g3_human_detection (Camera G3 Human Detection)
  • switch.camera_g3_pets_detection (Camera G3 Pets detection)
  • switch.camera_g3_timestamp (Camera G3 Timestamp)
  • switch.camera_g3_frame (Camera G3 Frame)
  • button.camera_g3_horizontal (Camera G3 Horizontal)
  • button.camera_g3_upside (Camera G3 Upside)
  • button.camera_g3_night_video_auto (Camera G3 Night Video Auto)
  • button.camera_g3_night_video_off (Camera G3 Night Video Off)
  • button.camera_g3_night_video_on (Camera G3 Night Video On)
  • switch.camera_g3_mute_audio_rec (Camera G3 Mute audio rec)
  • switch.camera_g3_gesture_need_face (Camera G3 Gesture Need Face)
  • button.camera_g3_sensor_motion_low (Camera G3 Sensor Motion low)
  • button.camera_g3_sensor_motion_medium (Camera G3 Sensor Motion medium)
  • button.camera_g3_sensor_motion_hight (Camera G3 Sensor Motion hight)
  • sensor.camera_g3_face_know (Camera G3 Face Know)
  • button.camera_g3_face_know (Camera G3 Face Know)
  • button.camera_g3_ptz_allup (Camera G3 PTZ allUP)
  • button.camera_g3_ptz_alldown (Camera G3 PTZ allDOWN)
  • button.camera_g3_ptz_allleft (Camera G3 PTZ allLEFT)
  • button.camera_g3_ptz_allright (Camera G3 PTZ allRIGHT)
  • button.camera_g3_ptz_center (Camera G3 PTZ Center)
  • sensor.camera_g3_log (Camera G3 log)
  • sensor.camera_g3_log_last1 (Camera G3 log last1)
  • sensor.camera_g3_log_last2 (Camera G3 log last2)
  • sensor.camera_g3_log_last3 (Camera G3 log last3)
  • button.camera_g3_log (Camera G3 log)
  • sensor.aqara_userid (Aqara UserID)
  • sensor.camera_g3_info (Camera G3 Info)
  • button.camera_g3_indicator_light_on (Camera G3 Indicator light ON)
  • button.camera_g3_indicator_light_off (Camera G3 Indicator light OFF)
  • button.camera_g3_sensor_suond_medium (Camera G3 Sensor Suond medium)
  • button.camera_g3_sensor_suond_low (Camera G3 Sensor Suond low)
  • button.camera_g3_sensor_suond_hight (Camera G3 Sensor Suond hight)
  • button.camera_g3_reboot (Camera G3 reboot)
  • button.camera_g3_ptz_calibration (Camera G3 PTZ calibration)
  • text.camera_g3_resourceid_query (Camera G3 resourceID query)
  • sensor.camera_g3_resourceid_query (Camera G3 resourceID query)
  • switch.camera_g3_gateway_deletion_prevention (Camera G3 Gateway Deletion Prevention)
  • switch.camera_g3_device_offline_notification (Camera G3 Device Offline Notification)
  • switch.camera_g3_ark_mode (Camera G3 Ark Mode)
  • switch.camera_g3_automatic_unlocking (Camera G3 Automatic Unlocking)
  • switch.camera_g3_power_off_ptz_memory (Camera G3 Power-off ptz-memory)
  • button.aqara_my_device (Aqara My Device)
  • sensor.aqara_mydevice (Aqara MyDevice)
  • button.camera_g3_sensor_human_low (Camera G3 Sensor Human low)
  • button.camera_g3_sensor_human_medium (Camera G3 Sensor Human medium)
  • button.camera_g3_sensor_human_hight (Camera G3 Sensor Human hight)
  • button.camera_g3_sensor_catdog_low (Camera G3 Sensor CatDog low)
  • button.camera_g3_sensor_catdog_medium (Camera G3 Sensor CatDog medium)
  • button.camera_g3_sensor_catdog_hight (Camera G3 Sensor CatDog hight)
  • button.camera_g3_sensor_face_low (Camera G3 Sensor Face low)
  • button.camera_g3_sensor_face_medium (Camera G3 Sensor Face medium)
  • button.camera_g3_sensor_face_hight (Camera G3 Sensor Face hight)
  • button.camera_g3_hand_one (Camera G3 Hand One)
  • button.camera_g3_hand_both (Camera G3 Hand Both)
  • switch.camera_g3_anti_theft_lock (Camera G3 anti-theft-lock)
  • switch.camera_g3_anti_lost_not (Camera G3 anti-lost-not)
  • switch.camera_g3_motion_rec (Camera G3 motion_rec)
  • switch.camera_g3_motion_push (Camera G3 motion_push)
  • switch.camera_g3_suond_rec (Camera G3 suond_rec)
  • switch.camera_g3_suond_push (Camera G3 suond_push)
  • switch.camera_g3_face_rec (Camera G3 face_rec)
  • switch.camera_g3_face_push (Camera G3 face_push)
  • switch.camera_g3_person_rec (Camera G3 person_rec)
  • switch.camera_g3_animal_push (Camera G3 animal_push)
  • switch.camera_g3_animal_rec (Camera G3 animal_rec)
  • switch.camera_g3_person_push (Camera G3 person_push)
  • button.camera_g3_ptz_stop (Camera G3 PTZ Stop)
  • switch.camera_g3_sleep_mode (Camera G3 sleep_mode)
  • button.aqara_fp2_config (FP2 Config)
  • sensor.aqara_userid_fp2 (Aqara UserID_fp2)
  • sensor.aqara_fp2_config (FP2 Sensor Config)
  • button.aqara_fp2_info (FP2 Button Info)
  • sensor.aqara_fp2_info (FP2 Sensor Info)
  • button.aqara_fp2_setting (Setting)
  • sensor.aqara_fp2_setting (Setting)
  • button.aqara_fp2_find_device (Find device)
  • button.fp2_presence_detec_sens_hight (FP2 Presence Detec Sens Hight)
  • button.fp2_presence_detec_sens_medium (FP2 Presence Detec Sens Medium)
  • button.fp2_presence_detec_sens_low (FP2 Presence Detec Sens Low)
  • button.fp2_proximity_sens_distance_medium (FP2 Proximity Sens Distance Medium)
  • button.fp2_proximity_sens_distance_far (FP2 Proximity Sens Distance Far)
  • button.fp2_proximity_sens_distance_close (FP2 Proximity Sens Distance Close)
  • button.fp2_ai_person_detection_off (FP2 AI Person Detection Off)
  • button.fp2_ai_person_detection_on (FP2 AI Person Detection On)
  • button.fp2_anti_light_pollution_mode_off (FP2 Anti-light Pollution Mode Off)
  • button.fp2_anti_light_pollution_mode_on (FP2 Anti-light Pollution Mode On)
  • button.fp2_reversed_coordinate_direction_disable (FP2 Reversed Coordinate Direction Disable)
  • button.fp2_reversed_coordinate_direction_enable (FP2 Reversed Coordinate Direction Enable)
  • button.fp2_reversed_coordinate_direction_auto (FP2 Reversed Coordinate Direction Auto)
  • button.fp2_detection_direction_left_right (FP2 Detection Direction Left-Right)
  • button.fp2_detection_direction_default (FP2 Detection Direction Default)
  • button.fp2_sleep_monitoring_sens_high (FP2 Sleep Monitoring Sens High)
  • button.fp2_sleep_monitoring_sens_low (FP2 Sleep Monitoring Sens Low)
  • button.fp2_sleep_monitoring_sens_medium (FP2 Sleep Monitoring Sens Medium)
  • button.aqara_fp2_log (FP2 Button Log)
  • sensor.aqara_fp2_log (FP2 Sensor Log)
18 Likes

Thanks for sharing!

7 Likes

HI!
It looks like either I’m doing something wrong, or the instructions are already outdated.

I’m following the instructions exactly, but the image is not displayed.

Here’s the log — it looks like there might be missing permissions. Is there a solution?


[14:35:10] INFO: Starting NGinx...
22 Jan 14:35:10 - [info] Started flows
22 Jan 14:35:15 - [info] [server:homeassistant] Connecting to http://supervisor/core
22 Jan 14:35:15 - [info] [server:homeassistant] Connected to http://supervisor/core
22 Jan 14:35:22 - [error] [function:Error Config]  
22 Jan 14:35:22 - [error] [function:Error Config] You do not have permission to perform the operation. subject permission denied
22 Jan 14:35:22 - [error] [function:Error Config] Verify config node
22 Jan 14:35:22 - [error] [function:Error Config]  
22 Jan 14:35:22 - [error] [ha-sensor:Camera G3 config] InputError: Attribute: TypeError: Cannot read properties of undefined (reading 'freesize')
22 Jan 14:35:24 - [error] [function:set eventlog] TypeError: Cannot read properties of undefined (reading '0')
22 Jan 14:35:27 - [error] [function:catch array id > json with name=id] TypeError: Cannot read properties of undefined (reading 'length')
22 Jan 14:36:54 - [error] [function:set eventlog] TypeError: Cannot read properties of undefined (reading '0')
22 Jan 14:36:55 - [error] [function:catch array id > json with name=id] TypeError: Cannot read properties of undefined (reading 'length')
22 Jan 14:38:12 - [error] [function:catch array id > json with name=id] TypeError: Cannot read properties of undefined (reading 'length')
22 Jan 14:38:14 - [error] [function:catch array id > json with name=id] TypeError: Cannot read properties of undefined (reading 'length')
1 Like

Hi! I can confirm that the tutorial shouldn’t be outdated, as I currently have it running with this exact setup on my Home Assistant.

Looking at your log (subject permission denied), I suspect the issue is related to the authentication/region or the device ID (did).

Here are a few things you could try:

Check Configuration: Double-check your Device ID (did) in the configuration. It usually looks like lumi1.macaddress. Also, verify that the Region and Account credentials match exactly what is set in your Aqara Home app.

Use the Docker Script: It might be helpful to use the Docker script (Option B) to verify your did, Region, and Credentials.

  • Since you have to log in via the script, it serves as a good test.
  • If the script logs in successfully but shows no devices in the list, you might be logged into the wrong Region.

Hope this helps!

Edit:

It’s definitely due to an incorrect or missing did. I just ran two tests: once with an incorrect email address, which resulted in “aqara_url or password incorrect”, and once with an incorrect did, which resulted in:

22 Jan 13:22:49 - [error] [function:Error Config fp2] You do not have permission to perform the operation. subject permission denied
22 Jan 13:22:49 - [error] [function:Error Config fp2] Verify config node
22 Jan 13:22:49 - [error] [function:Error Config fp2]  
22 Jan 13:22:49 - [error] [ha-sensor:Aqara FP2 config] InputError: Attribute: TypeError: Cannot read properties of undefined (reading 'value')```
2 Likes

I am trying to install but I get

Failed to install add-on
An unknown error occurred with addon 797fde71_nodered_aqara. Check supervisor logs for details (check with 'ha supervisor logs')

logs in ha supervisor logs are:

2026-01-25 11:22:50.611 INFO (SyncWorker_1) [supervisor.docker.manager] Running command '['docker', 'buildx', 'build', '.', '--tag', '797fde71/aarch64-addon-nodered_aqara:3.0', '--file', 'Dockerfile', '--platform', 'linux/arm64', '--pull', '--label', 'io.hass.version=3.0', '--label', 'io.hass.arch=aarch64', '--label', 'io.hass.type=addon', '--label', 'io.hass.name=AqaraPost_[Node-RED]', '--label', 'io.hass.description=NodeRed mod for AqaraPost-Homeassistant', '--label', 'io.hass.url=https://github.com/sdavides/AqaraPOST-Homeassistant', '--build-arg', 'BUILD_FROM=ghcr.io/hassio-addons/base:19.0.0', '--build-arg', 'BUILD_VERSION=3.0', '--build-arg', 'BUILD_ARCH=aarch64']' on docker.io/library/docker:29.2.0-cli
2026-01-25 11:22:51.916 ERROR (SyncWorker_1) [supervisor.docker.manager] Can't execute command: 404 Client Error for http+docker://localhost/v1.53/images/create?tag=29.2.0-cli&fromImage=docker.io%2Flibrary%2Fdocker: Not Found ("manifest for docker:29.2.0-cli not found: manifest unknown: manifest unknown")
2026-01-25 11:22:51.917 ERROR (MainThread) [supervisor.addons.addon] Could not pull image to update addon 797fde71_nodered_aqara: Can't execute command: 404 Client Error for http+docker://localhost/v1.53/images/create?tag=29.2.0-cli&fromImage=docker.io%2Flibrary%2Fdocker: Not Found ("manifest for docker:29.2.0-cli not found: manifest unknown: manifest unknown")
2026-01-25 11:26:15.826 INFO (MainThread) [supervisor.docker.addon] Starting build for 797fde71/aarch64-addon-nodered_aqara:3.0
2026-01-25 11:26:15.829 INFO (SyncWorker_3) [supervisor.docker.manager] Running command '['docker', 'buildx', 'build', '.', '--tag', '797fde71/aarch64-addon-nodered_aqara:3.0', '--file', 'Dockerfile', '--platform', 'linux/arm64', '--pull', '--label', 'io.hass.version=3.0', '--label', 'io.hass.arch=aarch64', '--label', 'io.hass.type=addon', '--label', 'io.hass.name=AqaraPost_[Node-RED]', '--label', 'io.hass.description=NodeRed mod for AqaraPost-Homeassistant', '--label', 'io.hass.url=https://github.com/sdavides/AqaraPOST-Homeassistant', '--build-arg', 'BUILD_FROM=ghcr.io/hassio-addons/base:19.0.0', '--build-arg', 'BUILD_VERSION=3.0', '--build-arg', 'BUILD_ARCH=aarch64']' on docker.io/library/docker:29.2.0-cli
2026-01-25 11:26:17.114 ERROR (SyncWorker_3) [supervisor.docker.manager] Can't execute command: 404 Client Error for http+docker://localhost/v1.53/images/create?tag=29.2.0-cli&fromImage=docker.io%2Flibrary%2Fdocker: Not Found ("manifest for docker:29.2.0-cli not found: manifest unknown: manifest unknown")
2026-01-25 11:26:17.115 ERROR (MainThread) [supervisor.addons.addon] Could not pull image to update addon 797fde71_nodered_aqara: Can't execute command: 404 Client Error for http+docker://localhost/v1.53/images/create?tag=29.2.0-cli&fromImage=docker.io%2Flibrary%2Fdocker: Not Found ("manifest for docker:29.2.0-cli not found: manifest unknown: manifest unknown")
1 Like

Hi,

I successfully installed this add-on on my system (running the current stable version), so the add-on itself generally works.

Looking at your logs it shows: manifest for docker:29.2.0-cli not found. The issue seems to be a version mismatch in your specific environment.

The Analysis:

  1. I checked the repository’s Dockerfile, and the developer does not hardcode version 29.2.0 anywhere. The add-on code seems fine.
  2. It appears your Home Assistant Supervisor is automatically trying to pull a build-helper image that matches your Host Docker version (29.2.0).
  3. The Mismatch: Currently, only Release Candidates exist on Docker Hub (e.g., 29.2.0-rc.2-cli). The exact stable tag 29.2.0-cli does not exist yet.

What is happening: Your host system is probably running Docker v29.2.0. The Supervisor tries to pull the matching build-tool 29.2.0-cli. Since Docker Hub only has the rc tags published so far, the pull fails with 404 Not Found.

Conclusion: This is a Supervisor/OS issue. You are likely on a Beta/Dev channel of Home Assistant OS which includes a very new Docker version that hasn’t published its stable CLI image to Docker Hub yet.

2 Likes

Hello

Have tried to implement this but I cannot get it to work, I get the following error:

[14:28:23] INFO: Starting NGinx...
28 Jan 14:28:23 - [info] Starting flows
28 Jan 14:28:24 - [info] Started flows
28 Jan 14:28:28 - [info] [server:homeassistant] Connecting to http://supervisor/core
28 Jan 14:28:28 - [info] [server:homeassistant] Connected to http://supervisor/core
28 Jan 14:28:48 - [error] [ha-sensor:Aqara MyDevice] InputError: Attribute: TypeError: Cannot read properties of undefined (reading 'did')

Under Node-Red Companion I have 1 device for Aqara G3 with 85 entities, the sensor.aqara_mydevice entity has all its attributes set correctly, i.e. Did, Positionname, Firmwareversion etc. I can also control the camera via the RTZ buttons. When re-starting HA the values are set to ‘unknown’, but get populated when starting AqaraPOST and the controls are also only available while AqaraPOST is running. Have even downgraded Node-Red to 4.1.3 since it appears the addon has recently been updated to use that version, but get the same error. There appears to be nothing under WebRTC Camera and there is no ‘camera.***’ entity anywhere in HA for it (I have other cameras connected without issue).

I do have the Hub connected to HA via matter but don’t think this is the issue. Anyone have any ideas what the issue may be here? Any help would be very much appreciated, many thanks :slight_smile:

3 Likes

Hello. I am currently running the following versions:

  • Home Assistant OS: Core 2026.1.3 / Supervisor 2026.01.1 / Operating System 17.0 / Frontend 20260107.2
  • HACS: v2.0.5
  • Node-RED Companion Integration: v4.2.2
  • WebRTC Camera: v3.6.1
  • AqaraPost [Node-RED]: v3.0

Everything is working fine on my end, yet I am still receiving the same error message: "Cannot read properties of undefined (reading 'did')".

I’m not entirely sure, but the add-on allows for two G3 cameras to be configured, and I have only filled in the ‘did’ for one of them. I suspect the error might be coming from the second, empty G3 camera configuration.

Did you complete Step 2: “Integration via HomeKit”? If so, you should be able to see the entity. The camera.*** isn’t related to the AqaraPost add-on or the WebRTC Camera Integration (HACS); it comes from the HomeKit Device integration.

2 Likes

Yep I’m at the same versions.

Ah ok, that makes sense if it allows for 2 cameras.

Yep, missed step 2, my bad. Thought I just needed to remove it from Apple Home since it had been configured for a while.

Just tried to add the HomeKit Device via ‘Add integration’ and its not picking up the camera, maybe it needs to be in pairing mode? I’ll have a play with it tomorrow.

Many thanks for the quick reply.

3 Likes

So when this functionality is working correctly…should it provide an actual video stream from the Aqara camera, or really just like a series of still images, such as when the camera preview is viewed from Aqara dashboard before the play button is pushed?

2 Likes

Video playback is handled via HomeKit. With the G3 and G5 Pro, I can access a live video stream. With my battery-powered G410, a still image appears as soon as the dashboard is opened in Home Assistant. Does that answer your question?

3 Likes

I managed to integrate my G3 like this, @JohnD, similarly I had managed before using just Go2rtc and pairing it.
The problem I have is that I only get MJPEG stream, so it’s very low-res and choppy (a few frames/min).
So far I haven’t managed to get webrtc or mse streams showing anything…

2 Likes

I hope that can help you. I have this step-by-step list writer.

Complete Guide: Aqara Camera Hub G3 Setup in Home Assistant via go2rtc (WebRTC)

Phase 1: Preparation and Pairing Reset

  1. Remove from Apple Home (Crucial):
    If the camera was previously added to the Apple Home app on iOS, open the Home app, select the camera, go to its settings, and tap “Remove Accessory”.
    Note: The HomeKit protocol allows only one active controller at a time. If the G3 remains paired with Apple Home, it will reject pairing attempts from go2rtc.

  2. Initial Setup in Aqara Home App:

    • Open the Aqara Home app on your phone.
    • Add the camera and connect it to your local Wi-Fi network (it must be on the exact same network/VLAN as Home Assistant).
    • Update the Aqara G3 firmware to the latest available version.
  3. Locate the HomeKit Setup Code:

    • Look underneath the base of the camera or on the printed card inside the original box.
    • Find the 8-digit setup code next to the house icon (formatted as XXX-XX-XXX or XXXXXXXX). Write it down.

Phase 2: Discover and Pair the Camera in go2rtc

  1. Ensure a File Editing Add-on is Installed:
    In Home Assistant, make sure you have the File Editor or VS Code add-on installed (Settings > Add-ons > Add-on Store).

  2. Access the go2rtc Web UI:

    • Open a new browser tab and navigate to your Home Assistant IP address followed by port 1984 (e.g., http://192.xxx.x.xxx:1984).
    • Or click “go2rtc” in the Home Assistant left sidebar if enabled.
  3. Pairing via the Web UI:

    • On the main go2rtc Web UI dashboard, click the “Add” button at the top.
    • Scroll down to the HomeKit section (or click on mDNS/Devices).
    • Locate your Aqara Camera Hub G3 (e.g., Aqara-G3-XXXX) under local network devices.
    • Click on the camera, enter the 8-digit HomeKit code, and click “Pair”.
  4. Copy the Generated Stream String:

    • Once paired, go2rtc will display an automatically generated URL string starting with homekit://.
    • Example: homekit://127.0.0.1:XXXXX?device_id=XX:XX:XX:XX:XX:XX&pin=XXX-XX-XXX
    • Copy the entire string to your clipboard.

Phase 3: Write Configuration in go2rtc.yaml

  1. Open the Configuration File:
    Open the file named go2rtc.yaml in the /config/ directory using File Editor. (If it doesn’t exist, create it).

  2. Add the Stream Definition:
    Paste the following code block, replacing the homekit://... line with your exact copied string:

streams:
aqara_g3:
- homekit://127.0.0.1:XXXXX?device_id=XX:XX:XX:XX:XX:XX&pin=XXX-XX-XXX

  1. Save and Restart:
    Save the file, then go to Settings > Add-ons > go2rtc (or WebRTC Camera) and click Restart.

Phase 4: Create a Native Home Assistant Camera Entity (Optional)

  1. Open configuration.yaml using File Editor.
  2. Add the following code block at the bottom:

camera:

  • platform: ffmpeg
    name: Aqara G3 WebRTC
    input: rtsp://127.0.0.1:8554/aqara_g3
  1. Save the file.
  2. Go to Developer Tools > YAML > Check Configuration.
  3. If valid, restart Home Assistant (Settings > System > Restart).

Phase 5: Add the Zero-Latency WebRTC Card to Dashboard

  1. Open your Lovelace Dashboard, click the three dots in the top right > Edit Dashboard.
  2. Click “+ Add Card” at the bottom right > select “Manual”.
  3. Paste this YAML configuration:

type: custom:webrtc-camera
url: aqara_g3
mode: webrtc
ui: true

  1. Click Save and then Done.
6 Likes

Thank you very much for this.

You know, I was doing this and other explanations, and I was always hitting the same wall: no webrtc stream, only MJPEG.

But it seems that Home Assistant for Mac (the app) doesn’t support webrtc.

So, indeed, all what I was doing (and what you describe as well) works perfectly fine on the iPhone and on the web-based version of Home Assistant, but I was just testing it on the App :roll_eyes:

Hours wasted trying it on an app that is unable to render webrtc video! :sweat_smile:

4 Likes

@brachetta I hope you managed to connect it and get it working.

Hi @gtxteo, thanks for your guide.

I was playing around with this at almost the same time you posted and came up with a similar solution:

  1. Go to http://homeassistant.local:1984/AddCamera-Hub-G3-????, click the pair link, and enter the 8-digit HomeKit code (which you can find on the bottom of the G3). If the pair link isn’t there, the G3 is likely still connected to Apple Home or Home Assistant via HomeKit. Remove all connections and restart the camera, or if necessary, perform a network reset on the G3 (press and hold the front button for more than 10 seconds). For me, only the network reset worked.
  2. Go to http://homeassistant.local:1984/Streams → copy the camera name Camera-Hub-G3-???? and paste it under url in your dashboard:
type: picture-elements
image: >-
  data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16
  9'/%3E
elements:
  - type: custom:webrtc-camera
    url: Camera-Hub-G3-????
    mode: webrtc,webrtc/tcp
    style:
      top: 50%
      left: 50%
      width: 100%
      height: auto
      z-index: 0
    ui: false  
  - type: icon
    icon: mdi:arrow-up
    style:
      background: rgba(255, 255, 255, 0.25)
      right: 25px
      bottom: 50px
      z-index: 1
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.aqara_g3_camera_g3_ptz_up
  - type: icon
    icon: mdi:arrow-down
    style:
      background: rgba(255, 255, 255, 0.25)
      right: 25px
      bottom: 0px
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.aqara_g3_camera_g3_ptz_down
  - type: icon
    icon: mdi:arrow-left
    style:
      background: rgba(255, 255, 255, 0.25)
      right: 50px
      bottom: 25px
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.aqara_g3_camera_g3_ptz_left
  - type: icon
    icon: mdi:arrow-right
    style:
      background: rgba(255, 255, 255, 0.25)
      right: 0px
      bottom: 25px
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.aqara_g3_camera_g3_ptz_right
  - type: icon
    icon: mdi:arrow-collapse-all
    style:
      background: rgba(255, 255, 255, 0.25)
      right: 25px
      bottom: 25px
    tap_action:
      action: call-service
      service: button.press
      target:
        entity_id: button.aqara_g3_camera_g3_ptz_center
grid_options:
  columns: 12
  rows: 6

@brachetta For the mode in my dashboard, I specified webrtc,webrtc/tcp to force RTC. But if you are experiencing issues in certain environments like the Mac app, you could try mode: webrtc,webrtc/tcp,mse,hls,mjpeg. This should make it fall back to a working stream in exactly that order. At least, that’s how I understood it. I can’t try it out because I don’t own a Mac.


:spiral_notepad: A quick note regarding the original dashboard, which included the motion sensor like this:

- type: state-icon
    entity: binary_sensor.camera_hub_g3_????_motion_sensor
    style:
      left: 25px
      bottom: 0px

This will obviously no longer work once the HomeKit connection is routed through WebRTC instead of the Home Assistant HomeKit integration. Any sensors bound to the G3 Hub will also no longer be available as entities via the HomeKit connection. As a workaround, you can integrate the G3 Hub into HA as a Matter Bridge.

2 Likes

Thanks, @JohnD. Yes, this indeed skips the attempts to connect through MSE or HLS, but the camera still takes a few seconds to load and it’s definitely not as reactive as in the native Aqara app, or when paired to Apple Home directly.
Moreover, when I bridge the G3 from HA back to Apple Home and add it back there, the camera is practically unusable (only the thumbnail works, the live stream doesn’t), loses the audio and the sensor.

2 Likes

I accidentally made the mistake of loading the MJPEG stream in the background of the card, which was then overlaid by the WebRTC stream. This caused the stream to be loaded twice unnecessarily.

However, when I use the dashboard as described in my previous post, the stream’s loading time is unnoticeable to me. The video appears instantly. Another cool feature is that the camera automatically wakes up from privacy mode and rotates the lens to the front.

WebRTC is quite powerful. I also read somewhere that the audio input needs to be converted into a different audio output format in order to pass it through to Apple Home. I can’t find it right now, but I’ll take a closer look tonight. There could be a similar problem with the video format.

Regarding the sensors, as I wrote earlier, you can integrate the G3 Hub as a Matter Bridge in HA and pass all sensors through to Apple via HomeKit or Matter. And if you still need a motion sensor, you can set it up as a Matter signal in the Aqara app.

3 Likes

I sorted the bridging back to Apple Home:

In go2rtc config, I added below the streams:

homekit:
  Camera-Hub-G3-XXXX:

That created a new HomeKit device that was automatically discovered by Home Assistant.

I didn’t add it to Home Assistant. Instead, on my phone, I opened Apple Home/add accessory/more options and the new HomeKit device was there. I added it, used the generic Go2rtc pairing code 19550224 and the camera was successfully added.

It works fantastic, same as without the proxy. Moreover, all the services are there:

  • Camera
  • 2-way talk
  • Sensors
  • Alarm panel

No difference so far with having it added without the intermediate bridge.

So, the situation now is pretty good:

  • Home Assistant: The camera works great, sensor and alarm panel included, via the Webrtc card created on the dashboard
  • Apple Home: The camera works perfect as well, same as before getting it on HA

The only point still not working great:

The camera thumbnail that Home Assistant automatically shows on the Area/zone page or the security section is not using the RTC stream, but the camera entity’s image/MJPEG mechanism.

Sometimes it loads, sometimes it doesn’t = unreliable/unpredictable.

So, there’s a lot of progress, but hopefully there would be a way to make the entity consume the webrtc stream rather than the native one for the small thumbnails with the video feed.

2 Likes