camera-ui-aqara 0.0.0-stage → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,46 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [3.1.0] - 2026-11-07
9
+
10
+ ### Added
11
+
12
+ - Talk relays: two-way audio for Aqara cameras that another camera.ui plugin already manages, without adding them again. Add a relay in the plugin settings and point the camera's High source at its address.
13
+ - README: how to move a camera from another plugin to the Aqara plugin, and what stays behind.
14
+
15
+ ### Fixed
16
+
17
+ - Switching a camera from ONVIF to RTSP now asks the camera which RTSP streams it has, instead of assuming `ch1` to `ch3`. The check runs again when the camera's address changes.
18
+
19
+ ### Changed
20
+
21
+ - Updated ESLint to 10. Dependabot now leaves major versions of TypeScript and the Node.js type definitions alone.
22
+
23
+ ## [3.0.0] - 2026-11-07
24
+
25
+ ### Changed
26
+
27
+ - First release published to npm. It replaces the earlier `camera-ui-aqara` 2.x releases, which were withdrawn from npm. The version jumps to 3.0.0 so that camera.ui offers it as an update over any 2.x still installed.
28
+
29
+ ### Added
30
+
31
+ - Everything from 1.0.0: Aqara cameras and doorbells in camera.ui over the local network, by RTSP or ONVIF, with discovery, up to three streams per camera and two-way audio through Aqara's LAN talk protocol.
32
+
33
+ ## [1.0.0] - 2026-11-07
34
+
35
+ ### Added
36
+
37
+ - First release: Aqara cameras and doorbells in camera.ui over the local network.
38
+ - Discovery of Aqara cameras over mDNS and of ONVIF cameras over WS-Discovery, plus adding a camera by IP address.
39
+ - RTSP and ONVIF connections, chosen per camera. Adoption checks the credentials and finds which streams the camera serves.
40
+ - Up to three streams per camera (high, medium and low quality), with snapshots taken from the smallest.
41
+ - Two-way audio through Aqara's LAN talk protocol, offered to camera.ui as an RTSP talkback channel.
42
+ - Cameras follow their new address when their IP changes.
43
+
44
+ [3.1.0]: https://github.com/bisman-automations/camera-ui-aqara/compare/v3.0.0...v3.1.0
45
+ [3.0.0]: https://github.com/bisman-automations/camera-ui-aqara/compare/v1.0.0...v3.0.0
46
+ [1.0.0]: https://github.com/bisman-automations/camera-ui-aqara/releases/tag/v1.0.0
package/LICENSE.md ADDED
@@ -0,0 +1,52 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Donavan Becker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ ## Third-party notice
26
+
27
+ The Aqara LAN talk protocol implementation (`src/protocol.ts`, `src/talk.ts`)
28
+ and the model list (`src/models.ts`) are ported from
29
+ [Aqara-Camera-2-Way-Audio](https://github.com/absent42/Aqara-Camera-2-Way-Audio),
30
+ which is distributed under the following license:
31
+
32
+ MIT License
33
+
34
+ Copyright (c) 2026 Dan Gibson
35
+
36
+ Permission is hereby granted, free of charge, to any person obtaining a copy
37
+ of this software and associated documentation files (the "Software"), to deal
38
+ in the Software without restriction, including without limitation the rights
39
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
40
+ copies of the Software, and to permit persons to whom the Software is
41
+ furnished to do so, subject to the following conditions:
42
+
43
+ The above copyright notice and this permission notice shall be included in all
44
+ copies or substantial portions of the Software.
45
+
46
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
47
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
49
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
50
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
51
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
52
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,152 @@
1
- # Temporary Holding Version
1
+ # camera.ui Aqara
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm](https://img.shields.io/npm/v/camera-ui-aqara?label=npm&logo=npm)](https://www.npmjs.com/package/camera-ui-aqara)
4
+ [![camera.ui](https://img.shields.io/badge/camera.ui-%3E%3D2.4.0-blue)](https://github.com/cameraui)
5
+ [![CI](https://github.com/bisman-automations/camera-ui-aqara/actions/workflows/ci.yml/badge.svg)](https://github.com/bisman-automations/camera-ui-aqara/actions/workflows/ci.yml)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md)
7
+
8
+ Adds Aqara cameras and doorbells to [camera.ui](https://github.com/cameraui) over your local network, with **two-way audio**.
9
+
10
+ - Finds Aqara cameras on the network by themselves (mDNS), and ONVIF ones too (WS-Discovery).
11
+ - Connects over **RTSP** or **ONVIF**, chosen per camera.
12
+ - Serves up to three streams per camera (high, medium and low quality), so live view, detection and snapshots each use a fitting stream.
13
+ - **Talk through the camera's speaker** from camera.ui and the apps it streams to, such as HomeKit.
14
+ - Follows a camera to its new address when its IP changes.
15
+
16
+ Everything stays on your network. No Aqara account or cloud connection is needed.
17
+
18
+ ## How two-way audio works
19
+
20
+ Aqara cameras don't take talkback audio over RTSP or ONVIF. Both only carry audio from the camera. The speaker is reached through a separate protocol of Aqara's own on the local network (TCP port 54324 for control, UDP port 54323 for audio).
21
+
22
+ This plugin bridges the two. The camera's main stream goes through a small relay inside the plugin that offers camera.ui a standard RTSP talkback channel. Audio you speak into it is converted to the format the camera plays (AAC, 16 kHz) and sent to the speaker over Aqara's protocol. Either connection type works with two-way audio.
23
+
24
+ ## Requirements
25
+
26
+ - camera.ui 2.4.0 or newer.
27
+ - An Aqara camera with **RTSP** or **ONVIF** turned on in the Aqara app.
28
+ - camera.ui running on the same network as the camera. Multicast must reach it for discovery; otherwise add the camera by IP address.
29
+
30
+ ## Installation
31
+
32
+ In camera.ui, open **Plugins**, search for **Aqara** and install it.
33
+
34
+ To install from the command line instead:
35
+
36
+ ```sh
37
+ npm install camera-ui-aqara
38
+ ```
39
+
40
+ ## Setup
41
+
42
+ ### 1. Turn on RTSP or ONVIF in the Aqara app
43
+
44
+ Open the camera in the Aqara Home app, then its settings → **More Settings**:
45
+
46
+ - **RTSP LAN Preview**: turn it on and note the username and password it shows. Aqara serves RTSP on port 8554.
47
+ - **ONVIF**, on models and firmware that offer it: turn it on and note its username and password.
48
+
49
+ ### 2. Add the camera
50
+
51
+ 1. In camera.ui, open **Cameras** → **Add camera** and pick the Aqara plugin. Cameras the plugin found show up in the list.
52
+ 2. Choose the camera and fill in the form:
53
+ - **Connection**: RTSP or ONVIF. ONVIF is preselected when the camera answered ONVIF discovery.
54
+ - **IP Address**: filled in from discovery.
55
+ - **Username** and **Password**: from the Aqara app.
56
+ - **ONVIF Address** (ONVIF only): filled in from discovery. Leave it empty to use `http://<IP address>/onvif/device_service`.
57
+ - **Two-Way Audio**: on by default.
58
+ 3. Adopt it. The plugin checks the credentials and finds out which streams the camera serves before the camera is added.
59
+
60
+ ### Adding a camera discovery doesn't find
61
+
62
+ Open the Aqara plugin's settings, enter the camera's IP address (and a name if you like), and press **Add Camera**. The camera then shows up in the adoption list.
63
+
64
+ ## Two-way audio for cameras already in camera.ui
65
+
66
+ If an Aqara camera is already set up in camera.ui through another plugin (the generic RTSP or ONVIF one, say), you can give it two-way audio without adding it again. It keeps its recordings, events, zones and HomeKit pairing. The Aqara plugin runs a **talk relay** for it: a local address that serves the camera's video with a talkback channel added.
67
+
68
+ 1. Open the Aqara plugin's settings and fill in the **Talk Relay** fields:
69
+ - **Name**: the camera's name. It becomes part of the relay's address.
70
+ - **Camera IP Address**, **RTSP Username** and **RTSP Password**: from the Aqara app.
71
+ - **Stream**: `ch1` (best quality) unless your model names it differently, such as `1080p`.
72
+ - **Port**: leave empty to use the next free port from 8560.
73
+ 2. Press **Add Talk Relay**. The plugin checks that the camera answers with these credentials, then shows the relay's address, for example `rtsp://127.0.0.1:8560/front-door`.
74
+ 3. Open the existing camera's settings in camera.ui and set its **High** source URL to that address.
75
+
76
+ Talk now works for that camera like it does for cameras the Aqara plugin added. Only the source pointed at the relay carries talk, so use it for the High source. The address works only on the machine camera.ui runs on. To undo it, point the High source back at the camera's own stream, then press **Remove** next to the relay.
77
+
78
+ Unlike cameras added through the Aqara plugin, a relay doesn't follow the camera to a new IP address. Give the camera a fixed address in your router.
79
+
80
+ ## Moving a camera to the Aqara plugin
81
+
82
+ camera.ui doesn't let a camera move from one plugin to another, so moving one means adding it again:
83
+
84
+ 1. Note the existing camera's settings you want to keep: room, zones, detection, recording and notifications.
85
+ 2. Add the camera through the Aqara plugin (see **Setup**), then copy those settings over.
86
+ 3. Remove the old camera, and any talk relay you made for it, once the new one works.
87
+
88
+ The old camera's recordings and events stay with the old camera until you remove it, and apps such as HomeKit see the new camera as a new device. If keeping those matters more, use a talk relay instead.
89
+
90
+ ## Camera settings
91
+
92
+ Each camera's settings page in camera.ui has:
93
+
94
+ | Setting | What it does |
95
+ | --- | --- |
96
+ | Connection | RTSP or ONVIF. |
97
+ | IP Address | Updated automatically when the camera is found at a new address. |
98
+ | Username, Password | The RTSP or ONVIF credentials from the Aqara app. |
99
+ | ONVIF Address | The camera's ONVIF device service (ONVIF only). |
100
+ | RTSP Streams | The stream paths on port 8554, best first (RTSP only). Usually `ch1`, `ch2`, `ch3`; some models use names like `1080p` and `360p`. They're found by asking the camera when it's added, when you switch it to RTSP, and when its address changes. |
101
+ | Two-Way Audio | Turn off to free the speaker for other apps, or to send video straight from the camera without the relay. |
102
+
103
+ Changes take effect right away.
104
+
105
+ ## Supported models
106
+
107
+ Any Aqara camera with RTSP or ONVIF should work for video. Two-way audio has been confirmed on the **Camera G100** and the **G400 Video Doorbell**. These models share the same talk protocol and are expected to work too:
108
+
109
+ Camera Hub G2H, G2H Pro, G3, G5 Pro (Wi-Fi and PoE), Camera E1, G4 Doorbell and G410 Doorbell Camera Hub.
110
+
111
+ Doorbell models are added to camera.ui as doorbells. Let us know how your model does in an [issue](https://github.com/bisman-automations/camera-ui-aqara/issues), so this list can grow.
112
+
113
+ ## Troubleshooting
114
+
115
+ **The camera isn't discovered.**
116
+ Discovery relies on multicast, which doesn't cross VLANs or reach Docker containers without host networking. Add the camera by IP address instead (see above).
117
+
118
+ **"The camera rejected the username or password."**
119
+ Use the credentials shown in the Aqara app for RTSP or ONVIF, not your Aqara account. Turning RTSP off and on again in the app can give it new credentials.
120
+
121
+ **"Could not reach …:8554."**
122
+ RTSP is off for this camera in the Aqara app, or the camera is on a network camera.ui can't reach.
123
+
124
+ **Video works but talk does nothing.**
125
+ - Make sure **Two-Way Audio** is on for the camera.
126
+ - camera.ui has to be able to reach the camera on TCP port 54324 and UDP port 54323.
127
+ - The camera takes one voice session at a time. While the Aqara app or another integration is talking, the camera refuses the session. The plugin logs that and tries again 15 seconds later.
128
+
129
+ **Talk works only for a moment.**
130
+ Turn on debug logging for the camera in camera.ui and look for "Voice session" and "heartbeat" lines. A camera that stops answering heartbeats ends the session.
131
+
132
+ ## Development
133
+
134
+ ```sh
135
+ npm install
136
+ npm test # unit tests (node:test)
137
+ npm run lint
138
+ npm run typecheck
139
+ npm run bundle # all checks, then builds bundle/ with the camera.ui CLI
140
+ ```
141
+
142
+ `npm run bundle:dev` builds without the checks. To try a build in camera.ui, install the folder or the bundle the way the [camera.ui CLI](https://www.npmjs.com/package/@camera.ui/cli) describes.
143
+
144
+ Releases: every push to `main` drafts a GitHub release from `CHANGELOG.md`. Publishing the draft publishes the package to npm.
145
+
146
+ ## Credits
147
+
148
+ The Aqara talk protocol was reverse-engineered by Dan Gibson for [Aqara-Camera-2-Way-Audio](https://github.com/absent42/Aqara-Camera-2-Way-Audio), the Home Assistant integration this plugin's protocol code is ported from. Streaming and the talkback relay are built on [@seydx/rtsp](https://github.com/seydx/rtsp).
149
+
150
+ ## License
151
+
152
+ [MIT](LICENSE.md). Aqara is a trademark of its owner. This project isn't affiliated with or endorsed by Aqara.
package/bundle.zip ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,52 @@
1
1
  {
2
+ "displayName": "Aqara",
2
3
  "name": "camera-ui-aqara",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
4
+ "version": "3.1.0",
5
+ "description": "Adds Aqara cameras and doorbells to camera.ui over the local network: discovery, live streams on all three channels and two-way audio through Aqara's LAN talk protocol.",
6
+ "author": "Donavan Becker (https://github.com/bisman-automations/camera-ui-aqara)",
7
+ "type": "commonjs",
8
+ "main": "./dist/index.js",
9
+ "scripts": {
10
+ "build": "rimraf dist && tsc",
11
+ "bundle": "npm run format:check && npm run lint && npm run typecheck && npm test && npm run build && cui bundle",
12
+ "bundle:dev": "npm run build && cross-env MODE=development cui bundle",
13
+ "format": "prettier --write \"src/\" \"test/\" \"*.ts\" --ignore-unknown --no-error-on-unmatched-pattern",
14
+ "format:check": "prettier --check \"src/\" \"test/\" \"*.ts\" --ignore-unknown --no-error-on-unmatched-pattern",
15
+ "lint": "eslint .",
16
+ "test": "node --import tsx --test \"test/**/*.test.ts\"",
17
+ "typecheck": "tsc -p tsconfig.test.json",
18
+ "prepublishOnly": "node -e \"if(!process.env.SAFE_PUBLISH){console.error('Error: Please use @camera.ui/cli to publish the plugin:\\n npm run publish:latest\\n');process.exit(1)}\"",
19
+ "publish:beta": "npm run bundle && cui publish --beta",
20
+ "publish:latest": "npm run bundle && cui publish --latest"
21
+ },
22
+ "engines": {
23
+ "camera.ui": ">=2.4.0",
24
+ "node": ">=24.5.0"
25
+ },
26
+ "os": [],
27
+ "cpu": [],
28
+ "homepage": "https://github.com/bisman-automations/camera-ui-aqara#readme",
29
+ "bugs": {
30
+ "url": "https://github.com/bisman-automations/camera-ui-aqara/issues"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/bisman-automations/camera-ui-aqara.git"
35
+ },
36
+ "keywords": [
37
+ "camera-ui-plugin",
38
+ "aqara",
39
+ "cameras",
40
+ "doorbell",
41
+ "two-way-audio",
42
+ "rtsp"
43
+ ],
44
+ "license": "MIT",
45
+ "cameraui": {
46
+ "protocolLevel": 2
47
+ },
48
+ "files": [
49
+ "bundle.zip",
50
+ "CHANGELOG.md"
51
+ ]
6
52
  }