homebridge-dahua-camera-ultimate
v1.0.7
Published
Dahua Camera Ultimate - Homebridge plugin for direct Dahua IP camera integration with motion detection and FFmpeg streaming
Downloads
453
Maintainers
Readme
Dahua Camera Ultimate
homebridge-dahua-camera-ultimate
Homebridge plugin for direct Dahua IP camera integration — connects to individual cameras by IP address. No NVR required.
Features
- 📷 Direct camera connection — no NVR required, one plugin instance per camera
- 🔍 Auto-discovery of camera model, serial number, and firmware via CGI API
- 📹 RTSP streaming — mainstream, substream, or thirdstream
- 📸 Fast snapshots via CGI API with 3-second cache
- 🎯 Real-time motion detection via persistent event stream (VideoMotion, CrossLine, CrossRegion, AlarmLocal)
- 🔊 Audio passthrough — G.711/AAC copied directly, no transcoding (Dahua native)
- 🚀 Hardware acceleration — VAAPI, QuickSync, NVENC, AMF, VideoToolbox, V4L2
- 🎥 HomeKit Secure Video (HKSV) with pre-recording buffer
- ⚙️ Homebridge Config UI X support with clean, simplified settings
Installation
npm install -g homebridge-dahua-camera-ultimateOr install via Homebridge Config UI X by searching for homebridge-dahua-camera-ultimate.
Configuration
Add one platform entry per camera in your Homebridge config.json:
{
"platform": "Dahua_Camera_Ultimate",
"name": "Front Door",
"host": "192.168.1.100",
"username": "admin",
"password": "your-password"
}Full example with options
{
"platform": "Dahua_Camera_Ultimate",
"name": "Front Door",
"host": "192.168.1.100",
"username": "admin",
"password": "your-password",
"secure": false,
"streamType": "mainstream",
"motion": true,
"motionTimeout": 1,
"videoConfig": {
"qualityPreset": "1080p-standard",
"audio": true,
"copyAudio": true,
"recording": false,
"prebuffer": false,
"prebufferLength": 4000,
"encoder": "software"
}
}Video Quality Presets
| Preset | Resolution | Bitrate |
|--------|-----------|---------|
| 720p-standard | 1280×720 | 1500kbps |
| 1080p-standard (default) | 1920×1080 | 2000kbps |
| 1080p-hq | 1920×1080 | 4000kbps |
HomeKit maximum resolution is 1080p — 2K/4K is not supported by Apple HomeKit.
Audio
By default the plugin uses audio copy (passthrough) — Dahua cameras output G.711 (ulaw/alaw) or AAC which HomeKit supports natively, so no transcoding is needed. This gives the best audio quality with the lowest CPU overhead.
If you experience choppy or silent audio, disable copyAudio to transcode to AAC-ELD instead.
Hardware Acceleration
Hardware encoders reduce CPU usage by 70–90%. To use them:
- Set
encoderto your hardware type (vaapi,nvenc,quicksync,amf,videotoolbox,v4l2) - Set
videoProcessorto a custom FFmpeg binary compiled with hardware support - Optionally set
resolutionModetoforce-maxfor best results with hardware encoders
HomeKit Secure Video (HKSV)
Enable recording: true to record motion events to iCloud. Requires:
- An iCloud+ subscription (50GB supports 1 camera, 200GB supports 5)
- A HomeKit hub (HomePod, Apple TV 4K, or iPad set as home hub)
Enable prebuffer: true to capture video before motion is detected.
Tested Cameras
- IPC-HDW4231EM-AS
- Compatible with all Dahua IP cameras using standard CGI API
