npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

Readme

Dahua Camera Ultimate

homebridge-dahua-camera-ultimate

npm version Buy Me a Coffee verified-by-homebridge

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-ultimate

Or 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:

  1. Set encoder to your hardware type (vaapi, nvenc, quicksync, amf, videotoolbox, v4l2)
  2. Set videoProcessor to a custom FFmpeg binary compiled with hardware support
  3. Optionally set resolutionMode to force-max for 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

Author

pit5bul