github rroller/dahua 2.1.0-rc.6

pre-release2 hours ago

⚠️ BREAKING CHANGES — ACTION REQUIRED BEFORE UPGRADING

NEW IN RC.6 — CAMERA IDENTITY MIGRATION: Take a Home Assistant backup before upgrading. Cameras whose normal identity call fails but whose alternate CGI reports a serial now adopt that serial. Migration preserves entity IDs; unresolved collisions stop setup and require review through a repair or manual guidance. After adopting a serial, a temporarily unavailable serial read causes setup to retry rather than rebuilding entities under a generated identity.

No automatic entity removals or entity-ID renames are introduced compared with 2.0.0. The additional removal notices below apply when upgrading from 1.x.

Warning

Illuminator entities removed on affected channels: Channels that explicitly report a white emitter without a supported brightness bank no longer get an Illuminator light entity. Check automations and dashboards that reference it and remove or update affected references before upgrading.

Indoor monitors with no camera: Affected VTH monitors that do not describe a local camera and explicitly refuse the VideoInput table no longer get camera-related entities. Existing registry rows can remain unavailable. Review automations and dashboards that reference them.

Take a Home Assistant backup before upgrading. Existing HTTP indoor monitors now migrate their registry identities to their reported serial. Entity IDs are preserved. An unresolved registry conflict stops setup and raises repair or manual guidance; a backup failure retries without mutating the registries.

Affected recorder automations and dashboards need updating. This release removes the old per-camera Alarm Local sensors on recorders with the new terminal sensors and consolidates duplicate per-channel relay switches on the recorder.

  • Illuminator entities: A named white-light row without a MiddleLight, NearLight or FarLight brightness bank no longer creates an Illuminator entity. This removes controls whose writes target a nonexistent brightness field and are refused. Review affected automation/dashboard references.
  • VTH camera-related entities: A monitor with no Local0 camera declaration and an explicitly refused VideoInput table loses the nonworking camera-related entities, including motion controls. Retire affected dashboard and automation references. Session failures leave the capability undecided.
  • HTTP indoor monitors: This release migrates generated identities to the real serial. The log names a private directory containing copies of the three persisted registries. Keep your Home Assistant backup; resolve any logged identity conflict or backup failure before retrying setup.
  • Alarm inputs: Retarget automations and dashboards from the old per-camera Alarm Local sensors to the corresponding recorder terminal sensors. The old sensors become unavailable; their registry entries remain for reference.
  • Relay outputs: Update automations and dashboards that used duplicate per-channel relay switches to use the recorder's relay switches.

Release candidate for 2.1.0, adding actionable serial-collision recovery and extending reported-serial adoption to cameras that need the alternate CGI call. Requires Home Assistant 2026.8.0 or newer. The latest stable release remains 2.0.0.

New in 2.1.0-rc.6

  • Make serial-migration conflicts actionable: Permanent registry collisions now stop setup with a notification rather than retrying indefinitely. A confirmation repair is offered only when its proposed removals would clear every migration blocker. Otherwise, a manual notification names the unresolved conflicts and explains when to reload the entry. (#1146)

  • Validate before any removal: The repair lists affected entity/device records and unrelated entities it preserves, backs up the registries, and compares the complete plan both with the displayed confirmation and after backup. Changed ownership, holders, collision eligibility or remaining blockers stop removal. Unrelated attached entities keep their IDs and can migrate onto the surviving serial device. Review the listed removals before confirming: deleting a record can break automation/dashboard references to it.

  • Ask getSerialNo before generating an identity: Cameras that refuse getSystemInfo now get the alternate CGI serial read before falling back to a generated identity. Existing registry rows migrate while preserving entity IDs and device metadata. Once this path adopts a reported serial, the policy persists across reloads; if neither serial read later succeeds, setup retries instead of creating duplicate entities under the old generated identity. (#1141)

  • Keep manual guidance visible when a repair cannot help: A known remaining blocker now raises its notification directly, including after the backup check. An unrelated failed reload cannot dismiss the guidance or report that nothing is standing in the way. Nothing is deleted on that route. (#1149)

Included from 2.1.0-rc.4

  • Select DoorbellPressed for access controllers with a call button: Enable the event in the entry's event selection to get the Button Pressed binary sensor and Doorbell event entity, including on devices not classified as doorbells. CGI _DoTalkAction_ events ring only for Invite; answering or ending a call does not generate another press. The missing-State Pulse path now works without changing BackKeyLight's state checks. (#1147)
  • Subscribe to the raw events behind a selection: The CGI request now includes the sources of selected derived events, covering DoorbellPressed and Smart Motion selections. Diagnostics reports the actual wire subscription. Duplicate doorbell sensors are avoided when DoorbellPressed is explicitly selected. Existing event selections are preserved.
  • Hardware confirmation supplied by the owner: Two access controllers produced one ring per call and a five-second Button Pressed indication, with no extra rings on Answer or Hangup. This change targets CGI event streams; RPC2-only event polling does not gain derived-source expansion.

Included from 2.1.0-rc.3

  • Clarify silent audio playback troubleshooting: The README records the contributor's measured failure of nine CGI multipart audio pushes on a DHI-VTO2211G-WP-S2 running 4.810.0000000.3.R, alongside two audible go2rtc RTSP backchannel pushes on that same device. The workaround was tested through go2rtc 1.9.14's own API; Home Assistant's embedded go2rtc has not been verified for this use. This documentation does not add backchannel playback to dahua.play_audio. (#1148)

Included from 2.1.0-rc.2

  • Unblock upgrades with disabled duplicate registry records: When a disabled legacy row or device is blocked by an enabled record already carrying the reported serial, leave the disabled record intact and allow setup to continue. The decision is recomputed after registry backup, immediately before migration. Enabled conflicts and disabled-versus-disabled conflicts still stop migration. Nothing is deleted, and retained disabled records are not offered by the existing cleanup repair. (#1145)
  • The contributor reports that the original pass-over change restored startup on the affected recorder with 44 duplicate pairs. That hardware report predates the added backup-race checks; the final revision passed the independent registry tests below.

Included from 2.1.0-rc.1

  • Keep H.265 when live view works: The playback repair now offers an explicit choice to keep H.265 and dismiss its warning. The choice is remembered per entry and can be reversed in the entry's options. The options toggle has an English label and explanation. (#1140)
  • Set Device Clock: Add dahua.set_time, defaulting to Home Assistant's current local time when no time is supplied. An aware supplied time is converted to Home Assistant's local timezone. This sets the whole device, including every channel of a recorder. The contributor measured the clock write and revert on a VTO2000A. (#1139)
  • Set NTP Server: Add dahua.set_ntp_server for devices reporting an NTP server field. It uses the reported flat/primary-list fields, preserves the secondary fallback, and checks every requested setting in the read-back, including enable flags, ports and a requested update period. Unsupported requested fields are rejected before writing. (#1139)

Important

NTP configuration has not been verified on hardware. Its table shapes were measured on a DHI-NVR5464-16P-EI and a VTO2000A; the write and read-back behavior was tested with simulated device responses. Some doorbells have no NTP server field and refuse that service; dahua.set_time is the available clock-setting path on those devices.

Included from the 2.0.1 RC series

  • Improve serial-migration conflict messages to identify both sides and distinguish duplicate legacy rows from an already-held destination. Existing collision checks, registry backups and refusal-before-mutation behavior remain active. (#1144)
  • Fix dahua.play_audio on devices that challenge the audio POST with HTTP 401. The push retries once with the fresh challenge, the complete clip and fresh per-attempt state under the same speaker lock. A second refusal is reported. The contributor reports owner verification on the affected Empiretech Color4M. (#1137)
  • Update the development Black dependency to 26.10.1. This tooling dependency is not part of the HACS integration ZIP. (#1142)

Validation

The merged code passed 5,648 tests, including all three real-ffmpeg conversion cases. All 355 Python files pass Black 26.10.1. Seven independent real-registry replays cover late serial holders, mixed row/device convergence, a valid repair preserving an unrelated entity through migration, and retained manual guidance even when a reload would fail. The setup merge resolution retains both notification cleanup and the persistent serial policy. The HACS ZIP is verified against the tagged source and manifest version.

Hardware measurements in the linked PRs were supplied by contributors. The NTP write limitation is stated above.

2.0.0 release notes and upgrade instructions

Full changelog: 2.0.0...2.1.0-rc.6

Changes since the previous RC: 2.1.0-rc.4...2.1.0-rc.6

Don't miss a new dahua release

NewReleases is sending notifications on new releases.