Open-source project
rroller/dahua avatar
rroller/dahua

Dahua cameras in Home Assistant: what the integration actually exposes

Dahua Camera and Doorbell Home Assistant Integration

572 stars149 forksPythonMIT

At a glance

What is it?
The rroller Dahua integration is a Python custom component that talks to Dahua cameras, doorbells, NVRs and DVRs over a local HTTP API, turning device events into Home Assistant entities. It is feature rich, released outside Home Assistant core, and it fails setup for one reason far more often than any other: settings that live on the camera rather than in Home Assistant.
Who is it for?
Adopt this integration if you own Dahua hardware and want camera side events, switches and services wired into automations without waiting for Home Assistant core to accept a contribution. Do not adopt it if you need an officially reviewed integration with a predictable support window, or if your devices are reachable only through a cloud account.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A local HTTP API instead of a cloud account

rroller/dahua is a Home Assistant custom integration written in Python under the MIT licence. It covers Dahua cameras, doorbells, NVRs and DVRs, and the documentation says it is also confirmed to work with some Lorex cameras and Amcrest devices. The important architectural point is that Home Assistant talks to the device directly over its local HTTP API. Nothing is relayed through a vendor cloud, which means the device has to be reachable on your network and correctly configured for local control.

The entities it creates are event driven rather than polled. Motion, tripwire, intrusion, abandoned object, human and vehicle detection all arrive on the Home Assistant event bus and also as binary sensors, so an automation can notify you or switch a light without any interval based scanning. The integration exposes switches to turn motion detection on and off, to control the infrared light, the white illuminator, the red and blue security light flashers, the siren and the physical alarm output relay on devices that have them. There are also services to toggle motion detection and to set the text overlay on the video stream. Recordings stored on the device itself surface in the Home Assistant media browser under Dahua, grouped by camera and then by day, and they play back in the dashboard.

Six settings live on the camera, not in Home Assistant

The setup documentation opens with a warning that six things are decided on the camera or recorder, and that each one has been the entire cause of a failed setup for somebody. The visible part of that list covers the first four. The first is the CGI service, found under System, then Safety or Security, then System Service, and on some firmware under Local Settings and Security. Menu paths differ between firmware generations, so treat the entry as the setting to hunt for rather than an exact route.

You can test CGI from any browser by opening the machine name endpoint on the device address. A 404 means CGI is off. A login prompt means it is on. That single request settles the most common cause of an empty integration.

The second item is credentials. The login used by the Dahua, Imou or Amcrest app is a cloud account and will not work here. You need a user created on the device itself, usually admin in lower case, and phone keyboards like to capitalise it. Third, if the device has never had a password set, the password is the safety code printed on the device label, and a device that was never initialised has no account at all until you initialise it through its own web interface or ConfigTool. Fourth, the authentication mode has to be set correctly.

HACS install and the pre-release toggle

Installing through HACS takes a short path in the Home Assistant menu. You open HACS, go to Integrations, click the EXPLORE & ADD REPOSITORIES button, search for Dahua, click INSTALL THIS REPOSITORY IN HACS, restart Home Assistant, and then add the integration from Configurations and Integrations with the ADD INTERATIONS button.

The repository requires Home Assistant 2026.8.0 or newer, because a recorder's channels are stored as configuration subentries, and HACS will not offer the integration on anything older. The pinned dependency set in requirements.txt reflects a recent core as well, with homeassistant~=2026.9.3 and ha-ffmpeg==3.2.2.

The distribution model is worth understanding. Fixes land in a pre-release first, usually within a day, and are gathered into a stable release afterwards. Pre-releases are hidden unless you ask for them, so doing nothing keeps you on the stable line. To opt in, open Settings, then Devices and services, then the Integrations tab, open HACS, find the Dahua integration and turn on the pre-release toggle. The trade-off is stated plainly in the documentation: pre-releases get less testing than stable by definition, so avoid one on a camera you cannot afford to have misbehave for an afternoon. If you report a problem, say which version you are on, and open an issue rather than quietly rolling back.

Manual install copies custom_components/dahua by hand

If you would rather not use HACS, the repository ships as a zip you can unpack and move into place. The documented sequence downloads the main branch archive, unzips it, and moves the integration folder into the custom_components directory of your Home Assistant config.

bash
# Download a copy of this repository
$ wget https://github.com/rroller/dahua/archive/refs/heads/main.zip

# Unzip the archive
$ unzip main.zip

# Move the dahua directory into your custom_components directory in your Home Assistant install
$ mv dahua-main/custom_components/dahua <home-assistant-install-directory>/config/custom_components/

After either installation method you restart Home Assistant and clear your browser cache, because the integration may not otherwise be visible in the list. That last step catches people out more often than it should, and the documentation flags it with a warning. The alternative to HACS is useful when you are air gapped or you want to pin a specific commit, but it means you handle upgrades yourself, since the pull request style update path that HACS provides is not part of this flow.

Live streaming needs one ffmpeg entry in config.yaml

Live view is not enabled by default, and the documentation is precise about the requirement. To get live streaming you add the following to your config.yaml, which is the empty ffmpeg configuration that tells Home Assistant to use the ffmpeg integration and the stream integration for camera feeds.

yaml
ffmpeg:

The project points at the Home Assistant ffmpeg and stream integration documentation for the surrounding configuration. The ha-ffmpeg dependency pinned in requirements.txt at 3.2.2 is the bridge that makes the Dahua stream endpoints readable by Home Assistant. This is a separate concern from entity setup, and it is easy to conflate the two: a camera can be present with working sensors, switches and events while its live picture still fails, and the fix in that case is the ffmpeg configuration rather than any Dahua setting.

The infrared switch quietly turns off auto mode

There is a behaviour in this integration that the documentation calls out in a note, and it is the kind of detail that separates a working camera from a puzzling one. Using the switch to turn the infrared light on or off disables the automatic mode. To get auto mode back you use the service to enable it again, or you go to the camera's own user interface. Nothing in the switch state itself tells you that the automatic behaviour has been switched off, so an automation that flips the infrared light once can silently leave the camera running in manual mode long afterwards.

The same pattern of trade off appears elsewhere. Motion detection, smart motion detection, recording mode, privacy masks and the motorised lens cover are all switchable, so presence in the home can turn cameras down rather than off. The white illuminator and the infrared light are exposed as light entities, which means an automation can light the driveway and then hand the camera back to its own automatic mode. The siren, the red and blue security light and the physical alarm output relay can all be switched where the hardware exists.

Doorbell presses, recognised plates and burned in text

The doorbell path is the clearest example of the event model. A press arrives as an event entity carrying a message of the form somebody rang at 19:42, and at the same time as a binary sensor that holds its state for a few seconds so that automations have something to wait on. There is also a button entity and a service to release the lock, which means the doorbell can be part of an access routine rather than only a notification trigger.

Cameras with ANPR turn the recognised plate into a sensor. Naming the plates you trust turns that into a binary sensor which is on only for those vehicles, so a gate can open for a car you know without an automation having to parse text. The same device side control extends to the video itself: the channel title, the timestamp and free text overlays can be set from an automation, which is how a temperature reading or a zone name gets burned into the recording. Control and presentation are both exposed, which is unusual for a camera integration.

Why this lives outside Home Assistant core

The documentation explains the project's position directly, and the reasoning is worth reading before you commit to it. The Amcrest integration already provided by Home Assistant is missing features that this one provides, and the author wants an integration branded as Dahua. Amcrest cameras are rebranded Dahua cameras, so the same reasoning applies to those devices.

The stated reason for living outside Home Assistant is release cadence. With the integration outside the core codebase it can be developed faster and released more often, whereas Home Assistant has release schedules and a rigorous review process that the author was not ready for while developing it. The plan is to move it into Home Assistant directly once it is mature. That context explains the rapid pre-release rhythm and the recent tags: 2.0.0-rc.2 and 2.0.0-rc.1 on 2026-10-20 and 2026-10-19, alongside 1.3.2-rc.1 on 2026-10-19, with the last push on 2026-10-20.

For an adopter the consequence is a component whose long term home is still uncertain, with upstream quality review not yet applied. That is a reasonable trade for early access to features, but it belongs in the decision.

Editorial conclusion

Adopt this integration if you own Dahua hardware and want camera side events, switches and services wired into automations without waiting for Home Assistant core to accept a contribution. Do not adopt it if you need an officially reviewed integration with a predictable support window, or if your devices are reachable only through a cloud account. Before you configure anything, open the CGI check URL on one device and confirm it returns a login prompt rather than a 404, then create a local account on that device and log in with it.

Frequently asked questions

Does the rroller Dahua integration support live streaming in Home Assistant?

Yes, but you have to add the ffmpeg configuration to your config.yaml first, and the project links to the Home Assistant ffmpeg and stream integration documentation for the rest. Sensors, switches and events work independently of the live picture.

What Home Assistant version does the rroller Dahua integration require?

Home Assistant 2026.8.0 or newer, because a recorder's channels are stored as configuration subentries. HACS will not offer the integration on an older install.

Why does Home Assistant not detect my Dahua camera after installing the integration?

The CGI service on the device is usually the cause, and you can test it by opening the machine name endpoint in a browser, where a 404 means CGI is off and a login prompt means it is on. You also need a user created on the device itself, since a cloud app login will not work, and you should clear your browser cache after installing so the integration appears in the list.

Can I install the rroller Dahua integration without HACS?

Yes. The documented manual route downloads the main branch zip, unzips it and moves the dahua folder into the custom_components directory of your Home Assistant config, after which you restart Home Assistant and clear your browser cache. You then handle upgrades yourself.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. Releases
  5. rroller/dahua on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/rroller-dahua.svg)](https://hysenlabs.com/projects/rroller-dahua)

Was this useful?