github rroller/dahua 3.1.0-rc.1

pre-releaseone hour ago

⚠️ BREAKING CHANGES — ACTION REQUIRED BEFORE UPGRADING

No new breaking changes when upgrading from 3.0.0. This candidate adds schedule controls and config-write recovery without removing entities or changing existing defaults.

Warning

Upgrading from 2.x or earlier? The 3.0.0 changes still apply. dahua.set_text_overlay and dahua.get_overlay_text now default to group: 1. Add group: 0 explicitly to scripts and automations that rely on the old default.

Indoor monitors explicitly reporting no local camera no longer get the Infrared light or Infrared Mode select. Review affected automations and dashboard references. Take a Home Assistant backup and read the 3.0.0 upgrade notices, including the identity-migration guidance and earlier entity changes, before upgrading from an older release.

Release candidate for 3.1.0. Requires Home Assistant 2026.8.0 or newer. The latest stable release remains 3.0.0.

Profile schedule controls

  • Add Profile day start and Profile night start configuration time entities on channels reporting one unambiguous enabled schedule interval. Values come from the camera and remain visible outside Schedule mode; switch Profile Management to Schedule before editing. Writes use whole-minute precision and require exact device readback. (#1196)
  • Changing one endpoint preserves the other endpoint from a fresh camera read under the device lock, so a newer camera-side change is not replaced with cached state. Writes preserve management mode, unknown fields, other schedule entries and other channels.
  • Give the two endpoints distinct channel-owned entity IDs. Unknown or malformed neighboring intervals prevent the integration from treating the schedule as unambiguous. Cameras with unsupported shapes keep their existing controls and receive no schedule time entities.
  • Reuse existing VideoInMode reads during normal setup and polling. When only the time platform is enabled, a dedicated probe and late retry support discover the controls without enabling exposure reads.

Schedule limitation: The existing Profile sensor can report Day while Night is active under Schedule. Profile-specific lighting and exposure commands can consequently address the Day bank. Use the camera's interface for those adjustments while using Schedule; this release does not change active-bank resolution.

Hardware evidence: The schedule contributor supplied camera-UI/API observations, including an exact 08:23 RPC2 readback and restoration of the original table. Review testing used simulated device state and the real integration client/coordinator/entity methods. No physical-device tests were performed in this review.

Config writes after malformed CGI responses

  • A config write whose CGI response has the narrowly recognized malformed framing error can recover over RPC2. Read the addressed table first; if the requested values are already present, report success without replaying the write. Otherwise preserve the complete table, apply typed field values, send it back and verify the requested and untouched fields. (#1191)
  • Serialize the initial CGI config write and its fallback transaction per device, including entries using different credentials. A readable CGI response can no longer bypass the transaction and have its change overwritten by a competing fallback. Existing RPC2 field, table and lighting paths participate where they share these tables.
  • Missing fields are reported as declined writes, allowing existing callers such as Motion Detection to try their supported alternate URL. A device that drops keys during a complete-table write is blocked from further automatic RPC2 fallback writes for the process lifetime.

Recovery limits: Large tables can still be refused by device request-size limits; the fallback does not retry them with a potentially destructive one-field write. IVS rule tables addressed by transport-specific array indexes remain on CGI. Non-config commands, ordinary absent CGI endpoints and unmeasured NTP field creation retain their existing behavior. Accepted-but-ignored writes, failed readback and timeouts remain errors. The change was checked with loopback HTTP responses and simulated RPC2 tables; no physical-camera validation was performed in this review.

Validation

  • 6,618 tests passed, including real-ffmpeg cases, on the combined source. All 388 Python files pass Black 26.10.0.
  • The previous independent mixed readable-CGI/whole-table race reproduction now passes. Seven additional schedule regression cases failed before the fixes; the new regression file also covers another channel, delayed discovery and disabled-platform behavior.
  • The release ZIP is checked for HACS layout and verified byte for byte against the tagged integration files. Release validation also checks HACS/Hassfest, formatting, tests, tag/manifest agreement and HACS release visibility.

Full changelog: 3.0.0...3.1.0-rc.1

Don't miss a new dahua release

NewReleases is sending notifications on new releases.