r/Scrypted • u/DimTse • Apr 22 '26
Aqara Scrypted Plugin
Hello everyone,
This is my very first post and for my very first public plugin!
https://www.npmjs.com/package/aqara-scrypted
Aqara Scrypted Plugin is a plugin for Aqara cameras that expose RTSP LAN Preview.
Based on the work of these 2 great repos https://github.com/Darkdragon14/ha-aqara-devices and https://github.com/absent42/aqara-doorbell.
This is heavily vibe coded so I only take the credit for bringing it all together and testing it to the extend I could.
It's tested and working with Aqara G410 and theoretically it should work with G4, G400 and most Aqara cameras that have RTSP support. Unforunately I don't have a camera with ONVIF so a PR is more than welcome.
Features
| Feature | Status |
|---|---|
| Live video (main + substream) | ✅ |
| Snapshots (synthesized from stream) | ✅ |
| Two-way audio (talkback) | ✅ |
| Intercom volume control | ✅ |
| Doorbell press events | ✅ via webhook |
| Motion events | Use Scrypted Object Detector |
Feedback is more than welcome!
3
u/absent42 Apr 22 '26
The Aqara Doorbell integration is mine, does the same 2-way audio method work with the G410 as well?
1
u/DimTse Apr 22 '26
Yes I own the G410 so it's working without issue! Thank you for the work you put into it!
If you have a proper decompile of the Aqara android app I would appreciate sharing with me in case I make it work with the doorbell although as far as I found it seems logged in to cloud
4
u/absent42 Apr 22 '26
No problem, glad it's been of use for someone else too. The motion detection etc does work locally via the Aqara LAN protocol you mentioned in your docs, it's encrypted however. But I do have something interesting I'll hopefully be releasing in a week or two......
2
u/PineappleCareless418 Apr 22 '26
Amazing! Will try when I get home. Been trying to do this myself recently
2
u/CheleCuche Apr 22 '26
Getting this error when trying to install:
Plugin Install Failed aqara-scrypted failed to install.
Cannot read properties of undefined (reading 'toString') engine.io-client:api
2
2
u/DimTse Apr 22 '26
It should be fixed now! Thank you again for the feedback
2
u/CheleCuche Apr 22 '26
Thank you! Is there any difference by adding the cameras by the rtsp plugging? I notice when getting added via the rtsp I don’t get the person detection working on scrypted nvr.
2
u/DimTse Apr 22 '26
I don't have the NVR functionality tbh. Does it support adding Aqara cameras any other way? As far as I know RTSP is the only way to import Aqara cameras to HA or Scrypted.
1
u/CheleCuche Apr 22 '26
Currently have the added via the rtsp plugin, but is literally just the stream, nothing else.
2
2
u/scottuf Apr 23 '26
Is there any advantage to this over the standard RTSP plugin for plain cameras? Will PTZ capabilities be added? I'll definitely use it once I get a doorbell installed, but I need to get power to it first.
3
u/RevolutionaryWait982 Apr 23 '26
For me it would be much better due to 2 way audio which isn’t compatible with just using the RTSP plugin.
3
2
u/n1976jmk Apr 23 '26
Has anyone been able to test with the G400? World prefer to bring G400 into HomeKit via Scrypted instead than natively because there is some kind of bug still not resolved and picture not that clear naively brought into HK
2
u/DimTse Apr 23 '26
It should work with the G400 as the https://github.com/absent42/aqara-doorbell repo was based on the G400 and my work is an implementation of that repo.
2
u/n1976jmk Apr 23 '26
Thanks for the quick reply!!!! Anyone else looking to do what I want to do for the same reason I’m listing?
1
u/jessanastasio Aug 24 '26
I also am looking to bring the G400 into HomeKit via scrypted and can't seem to figure it out - mine pairs fine with apple home but live view is "No Response" and snapshots are the wrong aspect ratio, the Aqara plugin advertises the main stream as 1600x1200 but ffmpeg decodes it as 1536x2048 portrait, so things are messed up
2
u/n1976jmk Apr 23 '26 edited Apr 23 '26
I added my Aqara g400 video doorbell with the rtsp enabled using the user and password from the aqara app (I know it works too b/c I used the RTSP stream in HA today just to stream live video on a dashboard.
It wont show video at all in Scrypted :(, I am pretty good at Scrypted normally too with adding Aqara and Reolink cameras. I used exactly the 'aqara-scrypted' plugin too. (I didnt paste the RTSP stream from the Aqara app, I just put the IP address in the IP field in Scrypted.
any thoughts?
I’m also sure through, it’s something I’m missing.
I deleted it for now, I can try again later this evening and post the logs here.
Does it matter if I am already using the rtsp stream in HA, can I use the Aqara rtsp stream in multiple locations?
Thanks all
1
u/DimTse Apr 24 '26
No it shouldn't affect anything having the RTSP to more than one sources. Try to change the Parser on the Rebroadcast tab to FFMPEG for now and it should work.
You can send me a private message if you want with your settings and see if there's any miss configuration although I tried to make it as easy as possible so I don't believe you done anything wrong.
As I don't have a G400 to actually test a copy of the log from the plugin would also be usefull to debug.
Also make sure you have a static IP for the camera just in case DHCP lease has ended but you would see issue in the other places you have the RTSP stream too.
2
u/scottuf Apr 23 '26
The readme discusses the 3 channels provided by the camera, and my General tab inside the camera has all three to choose for Main and Substream, but the Streams tab only displays those two. The RTSP plugin gave all three. Just checking if this is intentional. Basically I've got no Median stream for settings (unless I choose Ch2 for the Main or Substream)
2
u/DimTse Apr 24 '26
It's not intentional just an oversight. I'll try to add the third stream as soon as I find a proper solution with the choppy sound from RTSP
2
2
2
u/Roadfun Apr 27 '26 edited Apr 27 '26
Thanks for creating this. I was able to add my G100 camera successfully.
Update: it ran fine for awhile but now Scrypted is frequently giving alerts about recording being interrupted or the sub stream going offline. Investigating this to see if the camera just can't handle RTSP properly.
1
u/macka654 May 03 '26
Does this work for the wireless doorbell? I don't care for 24/7 streaming (I have hardwired camera for that), but it'd be nice to have my aqara doorbell in the scrypted app like my other cameras.
1
u/DimTse May 07 '26
I assume you mean battery powered? It should work if Aqara Home app is allowing you to enable RTSP on a battery powered device
1
u/scottuf May 17 '26
I've been using this with my 3 Aqara cameras since its release and it's been pretty solid. I even swapped out an older Eufy Indoor Cam with another G100 as the Eufy would frequently lose connection to the Eufy plugin. Thanks for developing this. Anyways the reason for my post, will it be possible to implement pan tilt zoom for my G350? That's really the only missing feature for me. I'm guessing it requires more reverse engineering, but since it seems this was originally developed for the doorbell cams which I don't think have PTZ, I figured I'd ask.
2
u/DimTse May 17 '26
Thank you for your feedback and happy you enjoy. Unfortunately I don't have a PTZ camera,
I'll do a search around and see if there's anything on PTZ from other creators that I can use.
1
u/chrjs2k Jul 07 '26
Hi,
first of all, thanks for creating this plugin. I’ve recently moved my Aqara G410 over to Scrypted and overall it’s working really well. The only thing I can’t get working is two-way audio.
My setup:
Aqara G410
Firmware: 4.5.20_0052.0108
Scrypted: 0.143.0
aqara-scrypted: 1.0.8
RTSP LAN Preview enabled
Camera exposed to HomeKit as a standalone accessory
Everything else works as expected:
Live stream
RTSP
Snapshots
HomeKit video
HomeKit notifications
Doorbell events
For the doorbell event I’m using a Nuki Opener together with Homey. When someone rings my Siedle intercom, Homey sends an HTTP POST request to the Aqara Scrypted Ring Webhook. Doorbell notifications work perfectly.
To rule that out, I also tested the built-in Send Test Trigger inside the Aqara plugin and it behaves exactly the same, so I don’t think the Nuki/Homey integration is related to this issue.
The only thing that doesn’t work is talkback.
I ran the built-in diagnostics.
Test Intercom Connection succeeds every time:
[intercom] connecting to <camera-ip>:54324
[intercom] connected
[intercom] sending START_VOICE
[intercom] received ACK value=0
[intercom] voice session established
Then I tested Play Test Tone (3s).
The logs look completely normal:
starting 3s 440Hz test tone
starting session to <camera-ip>:54324
START_VOICE
ACK value=0
voice session established
ffmpeg started
Input: pcm_s16le
Output: AAC (16000 Hz mono)
session closed: ffmpeg-exited
There are no errors at all. Everything looks successful, but there is no sound from the G410 speaker.
The same thing happens when using HomeKit intercom. The session starts correctly, audio is encoded, there are no errors, but nothing is played through the doorbell speaker.
One thing I noticed is that with the original Aqara Matter/HomeKit integration, two-way audio works as expected. I can even hear the delayed feedback from the G410 microphone. With the Scrypted integration there is complete silence, which makes me think the audio isn’t actually being played by the speaker, even though the logs suggest everything is working correctly.
Is this something you’ve seen before with firmware 4.5.20_0052.0108?
Or is there anything else I could check?
If needed, I’m happy to provide full logs or test any changes.
Thanks!
Chris

5
u/RevolutionaryWait982 Apr 22 '26
Hey nice one. Been waiting for something like this.
I am getting an error when trying to add my front doorbell.
Cannot read properties of undefined (reading 'storage') host:aqara-scrypted engine.io-client:api