Aqara Video Doorbell G4 Announced with future Matter support

At CES this year Aqara annouced a new video doorbell that is supposed to drop this month in February.

Some highlights:

  • HomeKit Secure Video
  • Local streaming
  • Included USB-C chime that doubles as WiFi extender
  • Supports wired power
  • Claims it will work with Matter when the standard is expanded to support cameras

https://www.theverge.com/2023/1/5/23540309/aqara-ces-smart-home-matter-video-doorbell-sensor-lock-price

1 Like

I want a local-only wired doorbell with as much integration with home assistant as possible. I’ve been eyeing the Unifi G4 Pro but it’s never in stock and is really like a $500+ investment since I don’t own a Unifi console device. I do run Unifi access points but host the OS on my TrueNAS.

The Matter support has me really intrigued here but I know it could be months or years before that’s working. :confused:

1 Like

Don’t buy a device based on the promise of something. I’ve been burnt before.
I’m keen for this doorbell to have matter support, not just a promise of it.
I know with matter video is a future addition and very happy to wait.

Yeah good advice. I finally broke down and got the G4 Doorbell Pro. I installed it last week and it’s working well so far.

1 Like

But there aren’t a decent way to integrate it while keeping the full homekit functionality though.

And a little advice on anyone who has one, there’s a huge problem in early firmware(1.0.x or so) which was shipped with mine. It drains the battery little less than a month. They claim to have fix that in the update log of version 3.5.2_0012.0030.
I HAVEN’T tested it but you might wanna a heads up should you decide to stick to the old firware.

hello,

is there a way to integrate in HA? And if yes, which entities are?

Best regards

1 Like

Double that question. Integration in HA is key for me.

Native, HACS, custom, …? Anyone, anything?

By the way: „EUDOORBELLG4“ gives a nice 20 € discount on the G4 at Amazon.

It has some limitations, for details you can see this post Adding Aqara G4 to HA
And you can’t use functions that come with homekit security recordings (history, local face recognition, etc) since you’ll be using HA to bridge it back to homekit (if you need to).
I wouldn’t recommand it.
Any other advice on native integration is appreciated.

Oh well… that doesn’t sound very promising. I have one laying here now, probably sending it back without opening it at all, based on what I read about integration possibilities and limitations.

Other way around:

What’s currently possible at all in terms of integration?
Which features and entities are available?

  • using HomeKit gives a low quality video stream
 ?? Update ?

I did not test it at all. Will send it back and wait if some day there will be a possibility of easily (and preferred completely) integrating this device into HA.

I should have waited and checked for integration possibilities prior to buying it. Classic fail on my end :slight_smile: Future hardware shopping checklist:

Step one: Can it be easily integrated into HA without any major issues?
Step two: If one is "No", do not buy that stuff.
4 Likes

Any HomeKit camera (including all Aqara cameras) can be used with open source (including Home Assistant) via go2rtc.
You won’t lose any default functionality, like HKSV.

That sounds promising to me, I found it at Github and got overwhelmed by the massive information and settings. Is there any introduction available how I can integrate Aqara´s G4 doorbell via go2rtc?

Same here.
My understanding of the correct way to do this is to:

  1. Install WebRTC and go2rtc add-on (or as a container somewhere more powerful).
  2. Pair the doorbell with HA, and somehow import it to go2rtc.
  3. HA should now has control access by itself and a (more stable with smaller delay) camera feed via go2rtc.
  4. Configure transparent proxy and pair it back to homekit. So all default functionalities should be available within the apple ecosystem.

Will give this a shot tomorrow, and would love some tips in the meantime. :grin:

1 Like

Hi Alex. Sorry to bother.
I’m not sure if this counts as a bug or im simply doing it wrong, but i havent found similar issues.

I had my doorbell(aqara g4) paired with hass and then added into go2rtc. I’m running go2rtc add-on with webRTC integration. Other things like controls, event in hass and stream via go2rtc work like a charm. (thanks for the amazing work btw) But pairing it back to homekit times out on iPhone or throws an error on hass:

An unhandled error occurred while attempting to pair with this device. This may be a temporary failure or your device may not be supported currently: M2: Accessory did not send public key

Here’s my complete configuration:
(also tried with minimal config or without setting any password or manual PIN assignment)

api:
  listen: ":1984"
  base_path: ""
  static_dir: ""
  origin: ""
  username: "user"
  password: "password"

ffmpeg:
  bin: "ffmpeg"
  global: "-hide_banner"
  file: "-re -stream_loop -1 -i {input}"
  http: "-fflags nobuffer -flags low_delay -i {input}"
  rtsp: "-fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"
  output: "-user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
  # ... different presets for codecs

hass:
  config: "/config"

log:
  format: ""
  level: "trace"

ngrok:
  command: ""

rtsp:
  listen: ":8554"
  username: ""
  password: ""

srtp:
  listen: ":8443"

streams: 
  aqara_doorbell: 
    - hass:Aqara-G4-Doorbell
    - ffmpeg:aqara_doorbell#audio=aac#audio=opus#async     # only OPUS audio supported by HomeKit

webrtc:
  listen: ":8555"
  candidates: []
  ice_servers:
    - urls: [ "stun:stun.l.google.com:19302" ]
      username: ""
      credential: ""
      
homekit:
  aqara_doorbell:
    pin: 12345678
    name: Aqara G4 Doorbell

Here’s the logs. the last three “/pair-setup” came with my three attempts to pair it.

19:10:30.097 INF go2rtc version 1.7.1 linux/amd64
19:10:30.100 TRC [api] register path path=/
19:10:30.101 TRC [api] register path path=/api
19:10:30.101 TRC [api] register path path=/api/config
19:10:30.101 TRC [api] register path path=/api/exit
19:10:30.103 INF [api] listen addr=:1984
19:10:30.105 TRC [api] register path path=/api/ws
19:10:30.106 TRC [api] register path path=/api/streams
19:10:30.107 INF [rtsp] listen addr=:8554
19:10:30.123 INF [webrtc] listen addr=:8555
19:10:30.123 TRC [api] register path path=/api/webrtc
19:10:30.123 TRC [api] register path path=/api/frame.mp4
19:10:30.123 TRC [api] register path path=/api/stream.mp4
19:10:30.123 TRC [api] register path path=/api/stream.m3u8
19:10:30.123 TRC [api] register path path=/api/hls/playlist.m3u8
19:10:30.123 TRC [api] register path path=/api/hls/segment.ts
19:10:30.123 TRC [api] register path path=/api/hls/init.mp4
19:10:30.123 TRC [api] register path path=/api/hls/segment.m4s
19:10:30.124 TRC [api] register path path=/api/frame.jpeg
19:10:30.124 TRC [api] register path path=/api/stream.mjpeg
19:10:30.124 TRC [api] register path path=/static
19:10:30.124 TRC [api] register path path=/streams
19:10:30.125 TRC [api] register path path=/stream/
19:10:30.130 DBG [hass] load config url="hass:Desk Lamp"
19:10:30.131 DBG [hass] load config url="hass:Dorm Desk Lamp"
19:10:30.131 DBG [hass] load config url=hass:Aqara-G4-Doorbell
19:10:30.131 DBG [hass] load config url="hass:Go2RTC - 127.0.0.1:1984"
19:10:30.131 TRC [api] register path path=/api/hass
19:10:30.131 TRC [api] register path path=/onvif/
19:10:30.131 TRC [api] register path path=/api/onvif
19:10:30.132 TRC [api] register path path=/api/webtorrent
19:10:30.132 TRC [api] register path path=/api/stream.flv
19:10:30.133 TRC [api] register path path=/api/ffmpeg/devices
19:10:30.134 TRC [api] register path path=/api/ffmpeg/hardware
19:10:30.134 TRC [api] register path path=/api/dvrip
19:10:30.134 TRC [api] register path path=/api/stream.ts
19:10:30.134 TRC [api] register path path=/api/stream.aac
19:10:30.134 TRC [api] register path path=/api/roborock
19:10:30.135 TRC [api] register path path=/api/homekit
19:10:30.151 TRC [api] register path path=/pair-setup
19:10:30.153 TRC [api] register path path=/pair-verify
19:10:30.153 TRC [homekit] mnds: [{"name":"Aqara G4 Doorbell","port":1984,"info":{"c#":"1","ci":"17","ff":"0","id":"80:D9:4B:45:4F:CC","md":"go2rtc/1.7.1","pv":"1.1","s#":"1","sf":"1","sh":"w7rhJg=="}}]
19:10:30.153 TRC [api] register path path=/api/nest
19:10:30.156 TRC [api] register path path=/api/stack
19:10:30.330 TRC [api] GET / 172.30.32.2:44404
19:10:36.907 TRC [api] GET / 172.30.32.2:44404
19:10:37.004 TRC [api] GET /main.js 172.30.32.2:44404
19:10:37.091 TRC [api] GET /api 172.30.32.2:44404
19:10:37.194 TRC [api] GET /api/streams 172.30.32.2:44404
19:10:38.398 TRC [api] GET /editor.html 172.30.32.2:44404
19:10:38.475 TRC [api] GET /main.js 172.30.32.2:44404
19:10:38.600 TRC [api] GET /api/config 172.30.32.2:44404
19:11:07.846 TRC [api] POST /pair-setup 192.168.50.200:60094
19:11:16.565 TRC [api] POST /pair-setup 192.168.50.200:35818
19:11:30.790 TRC [api] POST /pair-setup 192.168.50.200:36894

Any advice would be help, thanks.:grinning_face_with_smiling_eyes:

Can you show where you get this error? Maybe screen. Never saw it.

Add-on updated to 1.8.0, and the issue persists.

On iPhone it got stuck on this page and then timed out:

When trying to pair it with hass (Using integration HomeKit Device) I got this:
(did this only to get a better understanding of why pairing it with iphone didn’t work)

Here’s the full log:
(started->streamed for a few seconds->tried to pair)

00:29:17.651 TRC [streams] check prod=1 media=audio, recvonly, OPUS/48000/2
00:29:17.651 TRC [streams] match prod=1 => cons=0
00:29:17.728 TRC [webrtc] answer
v=0
o=- 3657309464430491817 1697300957 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 20:34:C5:1C:E1:96:C3:18:A2:02:BD:F7:7C:8A:E3:AC:E7:AF:9F:B5:BA:53:33:EA:32:60:22:F2:AA:63:BB:3B
a=extmap-allow-mixed
a=group:BUNDLE 0 1
m=video 9 UDP/TLS/RTP/SAVPF 102 106 112
c=IN IP4 0.0.0.0
a=setup:active
a=mid:0
a=ice-ufrag:YAeTyrHUElGhRSPL
a=ice-pwd:gpRwKYqBrVHgsiqxXhHVgBtUQkhaJhcJ
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:102 H264/90000
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtcp-fb:102 goog-remb 
a=rtcp-fb:102 transport-cc 
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack 
a=rtcp-fb:102 nack pli
a=rtpmap:106 H264/90000
a=fmtp:106 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtcp-fb:106 goog-remb 
a=rtcp-fb:106 transport-cc 
a=rtcp-fb:106 ccm fir
a=rtcp-fb:106 nack 
a=rtcp-fb:106 nack pli
a=rtpmap:112 H264/90000
a=fmtp:112 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f
a=rtcp-fb:112 goog-remb 
a=rtcp-fb:112 transport-cc 
a=rtcp-fb:112 ccm fir
a=rtcp-fb:112 nack 
a=rtcp-fb:112 nack pli
a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=ssrc:660064883 cname:go2rtc
a=ssrc:660064883 msid:go2rtc go2rtc-video
a=ssrc:660064883 mslabel:go2rtc
a=ssrc:660064883 label:go2rtc-video
a=msid:go2rtc go2rtc-video
a=sendonly
m=audio 9 UDP/TLS/RTP/SAVPF 111 0 8
c=IN IP4 0.0.0.0
a=setup:active
a=mid:1
a=ice-ufrag:YAeTyrHUElGhRSPL
a=ice-pwd:gpRwKYqBrVHgsiqxXhHVgBtUQkhaJhcJ
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1
a=rtcp-fb:111 transport-cc 
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=ssrc:1762149620 cname:go2rtc
a=ssrc:1762149620 msid:go2rtc go2rtc-audio
a=ssrc:1762149620 mslabel:go2rtc
a=ssrc:1762149620 label:go2rtc-audio
a=msid:go2rtc go2rtc-audio
a=sendonly
00:29:17.729 TRC [webrtc] local candidate="candidate:2878742611 1 udp 2130706431 127.0.0.1 8555 typ host"
00:29:17.729 TRC [webrtc] local candidate="candidate:3325657005 1 udp 2130706431 192.168.50.200 8555 typ host"
00:29:17.744 TRC [webrtc] local candidate="candidate:954102776 1 udp 2130706431 172.30.232.1 8555 typ host"
00:29:17.745 TRC [webrtc] local candidate="candidate:2737820120 1 udp 2130706431 172.30.32.1 8555 typ host"
00:29:17.749 TRC [webrtc] local candidate="candidate:2076839501 1 tcp 1671430143 192.168.50.200 8555 typ host tcptype passive"
size=       0kB time=00:00:00.08 bitrate=   0.0kbits/s speed=N/A    
size=N/A time=00:00:00.56 bitrate=N/A speed=0.975x    
[aac @ 0x7f1edd370c00] Queue input is backward in time
[rtsp @ 0x7f1ee0e83580] Non-monotonous DTS in output stream 0:0; previous: 10135, current: 9821; changing to 10136. This may result in incorrect timestamps in the output file.
00:29:18.219 TRC github.com/AlexxIT/go2rtc/internal/api/ws/ws.go:120 > error="websocket: close 1000 (normal)"
size=N/A time=00:00:01.20 bitrate=N/A speed=0.731x    
size=N/A time=00:00:02.24 bitrate=N/A speed=1.04x    
size=N/A time=00:00:02.74 bitrate=N/A speed=1.03x    
size=N/A time=00:00:03.12 bitrate=N/A speed=0.893x    
size=N/A time=00:00:04.06 bitrate=N/A speed=1.01x    
size=N/A time=00:00:04.56 bitrate=N/A speed=1.01x    
size=N/A time=00:00:04.94 bitrate=N/A speed=0.923x    
size=N/A time=00:00:05.94 bitrate=N/A speed=1.01x    
size=N/A time=00:00:06.46 bitrate=N/A speed=1.01x    
size=N/A time=00:00:06.84 bitrate=N/A speed=0.948x    
size=N/A time=00:00:07.78 bitrate=N/A speed=1.01x    
size=N/A time=00:00:08.26 bitrate=N/A speed=   1x    
size=N/A time=00:00:08.70 bitrate=N/A speed=0.957x    
[aac @ 0x7f1edd370c00] Queue input is backward in time
[rtsp @ 0x7f1ee0e83580] Non-monotonous DTS in output stream 0:0; previous: 150046, current: 149903; changing to 150047. This may result in incorrect timestamps in the output file.
00:29:34.060 DBG [streams] stop producer url=ffmpeg:aqara_doorbell#audio=aac#audio=opus#async
00:29:34.060 TRC [streams] stop reconnect url=ffmpeg:aqara_doorbell#audio=aac#audio=opus#async
size=N/A time=00:00:09.64 bitrate=N/A speed=1.01x    
size=N/A time=00:00:10.16 bitrate=N/A speed=   1x    
size=N/A time=00:00:10.54 bitrate=N/A speed=0.963x    
size=N/A time=00:00:11.48 bitrate=N/A speed=   1x    
size=N/A time=00:00:12.08 bitrate=N/A speed=1.01x    
size=N/A time=00:00:12.42 bitrate=N/A speed=0.97x    
size=N/A time=00:00:13.40 bitrate=N/A speed=1.01x    
size=N/A time=00:00:13.90 bitrate=N/A speed=   1x    
size=N/A time=00:00:14.28 bitrate=N/A speed=0.974x    
size=N/A time=00:00:15.22 bitrate=N/A speed=   1x    
size=N/A time=00:00:15.74 bitrate=N/A speed=   1x    
size=N/A time=00:00:16.12 bitrate=N/A speed=0.975x    
av_interleaved_write_frame(): Broken pipe
[out#0/rtsp @ 0x7f1ee0a11b80] Error muxing a packet
[out#0/rtsp @ 0x7f1ee0a11b80] Error writing trailer: Broken pipe
size=N/A time=00:00:16.68 bitrate=N/A speed=   1x    
video:0kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[aac @ 0x7f1edd370c00] Qavg: 65536.000
00:29:34.166 TRC [rtsp] server request:
TEARDOWN rtsp://127.0.0.1:8554/aqara_doorbell?audio RTSP/1.0
User-Agent: go2rtc/ffmpeg
Session: 87242507
Cseq: 5

00:29:34.167 DBG [rtsp] handle=EOF
00:29:34.167 DBG [streams] stop producer url=hass:Aqara-G4-Doorbell
00:29:34.168 DBG [streams] can't stop none producer
00:29:34.168 DBG [rtsp] disconnect stream=aqara_doorbell
Conversion failed!
00:29:34.222 TRC [exec] close url="exec:ffmpeg -hide_banner -use_wallclock_as_timestamps 1 -async 1 -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://127.0.0.1:8554/aqara_doorbell?audio -map 0:a:0? -c:a:0 aac -map 0:a:0? -c:a:1 libopus -application:a:1 lowdelay -frame_duration 20 -min_comp 0 -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
00:29:39.143 TRC [streams] stop reconnect url=hass:Aqara-G4-Doorbell
00:29:48.147 TRC [api] POST /pair-setup 192.168.50.200:52862

Hope this helps.

Don’t understand, what you doing. Because first step is pairing Doorbell with Hass. And this is shouldn’t be a problem.

That’s done.


Pairing it back to homekit is problematic.
I use hass to pair go2rtc’s virtual homekit device only to get more info as apple sure does not give me any clues on why it just keeps connecting and what went wrong

  1. Pair Doorbell to Hass
  2. Setup Doorbell stream in go2rtc
  3. Setup Doorbell homekit in go2rtc
  4. Pair go2rtc to Apple device
1 Like