camera-ui-aqara 2.0.0 → 2.2.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 +12 -0
- package/README.md +20 -9
- package/bundle.zip +0 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
- The doorbell/motion webhook now works on **any camera assigned to this plugin**, not only Aqara cameras this plugin adopted via RTSP. Assign "Aqara" as an additional sensor provider on a camera that already gets its video from another plugin, leave the RTSP Video section blank, and the webhook (`/ring/<token>`, `/motion/<token>/<on|off>`, the two test buttons) works exactly the same way.
|
|
6
|
+
- `host` / `username` / `password` are no longer marked required in camera settings, and are grouped under "RTSP Video (optional)" separate from "Doorbell & Motion Webhook" — leaving them blank no longer blocks saving a camera's settings.
|
|
7
|
+
- **Enable Local RTSP** now scopes to exactly what it says: discovery of new Aqara cameras (the "Add Aqara Camera (manual)" entry). Previously turning it off also paused the doorbell/motion webhook on every camera, Aqara or not; the webhook is independent of RTSP and always runs now, regardless of this toggle.
|
|
8
|
+
|
|
9
|
+
## 2.1.0
|
|
10
|
+
|
|
11
|
+
- Added a local **motion webhook** alongside the existing doorbell one: `http://<camera.ui-host>:<webhookPort>/motion/<token>/<on|off>`, firing that camera's motion sensor. Shares the same per-camera webhook server, port, and token as the doorbell webhook (now labeled "Webhook token" / "Regenerate webhook token" since it covers both).
|
|
12
|
+
- Added a **Test motion** button in camera settings (mirrors Test doorbell ring) — fires motion locally for 10s then auto-clears, no HTTP call needed.
|
|
13
|
+
- No native local push API is known for the camera's own presence sensor, so this webhook needs an external trigger — see the README for pairing it with [absent42/Aqara-LANLink](https://github.com/absent42/Aqara-LANLink) (a reverse-engineered local Aqara hub protocol, Home Assistant only, unofficial, tested against the M3 hub — G410 compatibility unconfirmed).
|
|
14
|
+
|
|
3
15
|
## 2.0.0
|
|
4
16
|
|
|
5
17
|
- Merged the former **camera-ui-aqara** (local RTSP) and **camera-ui-aqara-cloud** (Aqara Cloud) plugins into one plugin, with independent **Enable Local RTSP** / **Enable Aqara Cloud** toggles so either or both subsystems can run at once.
|
package/README.md
CHANGED
|
@@ -8,21 +8,24 @@ This replaces the two separate plugins, **camera-ui-aqara** (local) and **camera
|
|
|
8
8
|
|
|
9
9
|
| Feature | Source | Status |
|
|
10
10
|
| --- | --- | --- |
|
|
11
|
-
| Live video (main + substream) | Local | Yes |
|
|
12
|
-
| Snapshots (from main stream) | Local | Yes |
|
|
13
|
-
| Doorbell ring, via local HTTP webhook | Local | Yes |
|
|
11
|
+
| Live video (main + substream) | Local | Yes, for Aqara cameras adopted by this plugin |
|
|
12
|
+
| Snapshots (from main stream) | Local | Yes, for Aqara cameras adopted by this plugin |
|
|
13
|
+
| Doorbell ring, via local HTTP webhook | Local | Yes, on **any** camera assigned to this plugin |
|
|
14
|
+
| Motion sensor, via local HTTP webhook | Local | Yes, on **any** camera assigned to this plugin |
|
|
14
15
|
| Doorbell ring, via Aqara Cloud push | Cloud | Yes |
|
|
15
16
|
| Motion sensor, via Aqara Cloud push | Cloud | Yes |
|
|
16
17
|
| Two-way audio (talkback) | Local | Not yet (proprietary LAN protocol; planned) |
|
|
17
18
|
|
|
19
|
+
The webhook rows aren't limited to Aqara hardware: assign this plugin to any camera in camera.ui — one you adopted with it or one that already gets its video from a different plugin entirely — and that camera gets the doorbell/motion webhook too. See [Setup → Local](#1-local-rtsp-camera) below.
|
|
20
|
+
|
|
18
21
|
## Architecture
|
|
19
22
|
|
|
20
23
|
Two subsystems live in one plugin and run independently:
|
|
21
24
|
|
|
22
|
-
- **Local** — adopts
|
|
25
|
+
- **Local** — has two separable jobs. It adopts Aqara cameras by IP + RTSP credentials (`DiscoveryProvider`) and gives them video sources; separately, any camera assigned to this plugin — Aqara or not — gets a per-camera HTTP webhook that can fire that camera's doorbell and motion sensors. RTSP is entirely optional and only relevant if this plugin is also the one providing that camera's video.
|
|
23
26
|
- **Cloud** — logs into the Aqara Open API, subscribes to resource events for your devices, and receives them via an HTTP push listener and/or an optional [aqara-rocketmq-bridge](https://github.com/Darkdragon14/aqara-rocketmq-bridge) SSE feed. Matching doorbell/motion sensors are offered for **adoption on the Sensors page**, same as any other externally-sourced sensor — see [Setup → Cloud](#2-cloud-aqara-open-api) below.
|
|
24
27
|
|
|
25
|
-
Both are **on by default
|
|
28
|
+
Both are **on by default**. Two settings at the top of the plugin's page — **Enable Local RTSP** and **Enable Aqara Cloud** — let you turn either off independently without losing its configuration. Turning Local off only stops *offering new Aqara cameras* for adoption (the "Add Aqara Camera (manual)" entry disappears); the doorbell/motion webhook keeps working on every camera already assigned to this plugin regardless, since it doesn't depend on RTSP. Turning Cloud off stops the push listener/SSE client and the Aqara API calls; any sensors you'd already adopted stay in camera.ui but go quiet until you turn it back on.
|
|
26
29
|
|
|
27
30
|
## Prerequisites
|
|
28
31
|
|
|
@@ -59,12 +62,20 @@ Install the resulting bundle into camera.ui (Plugins → Install from file / loc
|
|
|
59
62
|
|
|
60
63
|
The G410 exposes three RTSP channels on port **8554**: `ch1` (main/high-res), `ch2` (medium), `ch3` (sub/low bitrate). Pick main/sub channels when adopting or later in camera settings.
|
|
61
64
|
|
|
62
|
-
**Doorbell
|
|
65
|
+
**Doorbell & motion webhooks:** Aqara doesn't expose ring or motion/presence events to third parties over RTSP, so both use the same local webhook approach as the original Scrypted plugin:
|
|
63
66
|
|
|
64
67
|
1. In the camera's settings, set **Webhook listen port** to a free port on the camera.ui host (e.g. `18789`).
|
|
65
|
-
2. Note the **
|
|
66
|
-
3. Point any trigger (Home Assistant `rest_command`, a Shortcut, curl) at
|
|
67
|
-
|
|
68
|
+
2. Note the **Webhook token** (or click **Regenerate webhook token** — this invalidates both paths below at once, since they share one token).
|
|
69
|
+
3. Point any trigger (Home Assistant `rest_command`, a Shortcut, curl) at:
|
|
70
|
+
- `http://<camera.ui-host>:<webhookPort>/ring/<token>` for the doorbell — GET or POST both work.
|
|
71
|
+
- `http://<camera.ui-host>:<webhookPort>/motion/<token>/<on|off>` for motion — same, GET or POST. `on` accepts `1` / `true` / `detected` / `active` too, `off` accepts `0` / `false` / `clear` / `inactive`.
|
|
72
|
+
4. Or use **Test doorbell ring** / **Test motion** in camera settings to fire either locally, no HTTP call needed (test motion auto-clears after 10s).
|
|
73
|
+
|
|
74
|
+
The camera's own presence sensor isn't reachable over RTSP or any documented local API, so the motion webhook needs something else to actually call it. If you run Home Assistant, [absent42/Aqara-LANLink](https://github.com/absent42/Aqara-LANLink) reverse-engineers Aqara's local hub protocol and can expose the camera's presence/motion state as a `binary_sensor` — unofficial and only validated against the Aqara M3 hub (the G410 is a `lumi1.` hub too, so it's plausible but unconfirmed). Point an HA automation at the `on`/`off` transitions of that entity and you have local motion with no RTSP frame analysis and no cloud. Failing that, fall back to the Aqara Cloud subsystem below, or a camera.ui motion/object detector plugin on the video stream.
|
|
75
|
+
|
|
76
|
+
#### Using the webhook on a non-Aqara camera
|
|
77
|
+
|
|
78
|
+
The doorbell/motion webhook doesn't need this plugin to own that camera's video. To add it to a camera that already gets its stream from a different plugin: open that camera's settings in camera.ui, assign **Aqara** as an additional sensor provider (alongside whatever already provides its video), then leave the whole **RTSP Video** section blank — set **Webhook listen port** and use the paths above like normal. Motion is a single-provider slot per camera, so this replaces whatever else was providing that camera's motion sensor, if anything; doorbell allows multiple providers, so it simply adds a second doorbell alongside any existing one. Every camera needs its own webhook port — they can't share one.
|
|
68
79
|
|
|
69
80
|
### 2. Cloud (Aqara Open API)
|
|
70
81
|
|
package/bundle.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Aqara",
|
|
3
3
|
"name": "camera-ui-aqara",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"description": "Aqara integration for camera.ui: local RTSP LAN video, snapshots, and a doorbell webhook (tested with G410), plus optional Aqara Cloud doorbell/motion sensors via the Open API. Merges the former camera-ui-aqara and camera-ui-aqara-cloud plugins into one, with independent Local/Cloud toggles so either or both can run at once.",
|
|
6
6
|
"author": "Adapted from DTse/aqara-scrypted for camera.ui",
|
|
7
7
|
"type": "commonjs",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
35
|
-
"url": "https://github.com/donavanbecker/camera-ui-aqara"
|
|
35
|
+
"url": "git+https://github.com/donavanbecker/camera-ui-aqara.git"
|
|
36
36
|
},
|
|
37
37
|
"cameraui": {
|
|
38
38
|
"protocolLevel": 2
|