A Scrypted plugin for Aqara cameras that expose RTSP LAN Preview (tested against the Aqara G410). Based on https://github.com/Darkdragon14/ha-aqara-devices and https://github.com/absent42/aqara-doorbell
| Feature | Status |
|---|---|
| Live video (main + substream) | ✅ |
| Snapshots (synthesized from stream) | ✅ |
| Two-way audio (talkback) | ✅ |
| Intercom volume control | ✅ |
| Doorbell press events | ✅ via webhook (see Doorbell ring events below) |
| Motion events | Use Scrypted Object Detector (see Motion detection below) |
- The camera must be hardwired (RTSP does not work on battery-only models).
- In the Aqara Home app:
- Open the camera → Settings → RTSP LAN Preview → enable.
- Copy the generated username and password.
- Note the camera's LAN IP address.
- Open the Scrypted web UI.
- Click Plugins in the sidebar, then click Install a Plugin.
- Search for
aqara-scryptedin the npm registry and click Install. - Wait a few seconds for Scrypted to download and initialise the plugin — you'll see Aqara Plugin appear in the plugin list.
No terminal, no build step, no file upload needed.
- In the Scrypted web UI, click Plugins → Aqara Plugin → Add Device.
- Fill in:
- Name: any friendly name (e.g. Front Door).
- IP Address: your camera's LAN IP (from the Aqara Home app).
- RTSP Username and RTSP Password: the ones generated when you enabled RTSP LAN Preview.
- Open the newly added camera from the Devices list and confirm the live preview works.
- (Optional) Set up doorbell ring events — see Doorbell ring events below.
Scrypted checks for plugin updates automatically. When a new version is available, a badge appears on Plugins → Aqara Plugin; click the update button and Scrypted pulls the new version from npm and restarts the plugin. Your camera configuration is preserved.
Plugins → Aqara Plugin → ⋮ menu → Uninstall. This removes the plugin and all cameras you added through it.
The G410 exposes three RTSP channels on port 8554:
| Channel | Approx. resolution |
|---|---|
ch1 |
Main (1600×1200 observed; varies by firmware) |
ch2 |
Medium |
ch3 |
Sub (low-bitrate, for thumbnails) |
Set the main/substream channel in each camera's Settings tab. Scrypted probes the actual stream dimensions at connection time, so the numbers above are informational only.
The G410's LAN protocol does not expose ring events directly — Aqara migrated to an encrypted ECDH+AES tunnel in newer firmware and the event is not visible to third-party plugins without a runtime DEX unpack of the official app (out of scope here).
The plugin works around this by exposing a webhook URL per camera. You wire that webhook up once to any trigger source (Aqara's own Matter Signal Sync via Home Assistant or Apple Home, an existing NVR, a physical switch, or anything else that can make an HTTP request). When the webhook fires, the camera's Scrypted Doorbell / BinarySensor turns on for 10 seconds — HomeKit, Scrypted NVR, and everything else downstream see it as a real ring.
Each camera's settings page has a Doorbell Ring Events section showing a URL like:
http://<scrypted-host>:<port>/endpoint/aqara-scrypted/public/ring/<token>
- GET or POST, both work. Any HTTP method with a 2xx response is accepted.
- Token is per-camera. Keep it secret — treat it like a password. Use Regenerate Token if it leaks; the old URL stops working immediately.
- Test Trigger button — fires the ring locally without hitting the URL. Use it first to confirm HomeKit/NVR react, before you set up the Matter side.
Pick one depending on what you already run. All three start with the same one-time step in Aqara Home:
One-time Aqara setup: Open the Aqara Home app → Profile → Connected Ecosystems → Matter → Scene and Signal Sync → Signal Management → create a new signal: "When the doorbell is pressed" → save. This exposes the G410's press event as a Matter
BooleanStatecluster on its Matter bridge.Then pair the G410's Matter bridge to one of the controllers below.
After pairing the G410 Matter bridge to HA's built-in Matter integration:
-
Find the doorbell press entity. It will be something like
event.aqara_g410_front_door_video_doorbell_ringingorbinary_sensor.aqara_g410_doorbell_presseddepending on your HA version. Press the button once and watch Developer Tools → States to confirm the entity updates when pressed. -
Add to
configuration.yaml(this declares a reusable HTTP action):rest_command: scrypted_aqara_ring: url: "http://SCRYPTED_HOST:PORT/endpoint/aqara-scrypted/public/ring/YOUR_TOKEN" method: POST
Then Developer Tools → YAML → Reload
rest_command(or restart HA). -
Create the automation. In the HA UI: Settings → Automations & Scenes → Create Automation → Start with an empty automation → ⋮ menu → Edit in YAML. Paste:
alias: "Aqara G410 → Scrypted ring" mode: single triggers: - trigger: state entity_id: event.aqara_g410_front_door_video_doorbell_ringing # change depending on your setup conditions: [] actions: - action: rest_command.scrypted_aqara_ring
Replace the
entity_idwith whatever the Matter integration actually created. Save. -
Press the doorbell → Scrypted fires a ring within ~1 second. If nothing happens, open Settings → Automations → your automation → Traces to see whether the trigger fired and whether the action succeeded.
After pairing the G410 Matter bridge to Apple Home:
- Open the Home app → the doorbell accessory → Automation (gear icon) → Add Automation.
- Trigger: An Accessory is Controlled → select the Aqara doorbell press sensor.
- Under actions, scroll past the accessories list and tap Convert To Shortcut.
- Remove any default actions. Add the Get Contents of URL action (Shortcuts → Web).
- Set URL to your webhook URL. Method: POST. No body needed.
- Save. Press the doorbell → Shortcuts fires the URL.
Note: Apple's HomeKit automation runs on a hub (HomePod/Apple TV/iPad). That hub must be able to reach your Scrypted host. If Scrypted is only reachable over Scrypted Cloud, use the cloud endpoint URL instead of the local one — you can get it from endpointManager.getCloudEndpoint equivalents in the Scrypted Cloud plugin.
curl -X POST "http://SCRYPTED_HOST:PORT/endpoint/aqara-scrypted/public/ring/YOUR_TOKEN"Useful for wiring up anything that can make an HTTP call: a shell script, a node-red flow, an IFTTT webhook, an ESP32 with a button, etc.
Scrypted doesn't have a Matter controller plugin as of 2026 — it can't commission and subscribe to Matter devices directly. Once Scrypted ships Matter controller support, this plugin will likely consume the G410's BooleanState cluster natively and the webhook will become optional. Until then, the webhook is the reliable path.
The Aqara LAN protocol does not expose motion events to third parties. Best options:
- Recommended: install the
@scrypted/objectdetectorplugin plus a detector (@scrypted/tensorflow-lite, or Scrypted NVR's detection if you have an NVR license). Gives you object-aware motion (person / car / animal) that Aqara's native PIR can't. - Use Scrypted's built-in motion detection plugin for basic frame-diff motion.
- If the camera is already paired to Home Assistant via HomeKit Controller, HA exposes the native PIR motion sensor. Bridge that entity into Scrypted via the Home Assistant plugin.
Only needed if you're contributing a code change or running an unreleased version. Regular users should use the Install section above.
Requires pnpm and Node.js 22+.
pnpm install
pnpm run build
pnpm run scrypted-deploy <your-scrypted-host>Other useful scripts: pnpm test (vitest), pnpm run lint, pnpm run typecheck, pnpm run dev (rebuild on change).
Issues and pull requests welcome on the GitHub repo.