[dahuadoor] Extend snapshot handling and align WebRTC URL - #20759
Merged
Conversation
Signed-off-by: Sven Schad <svnsssd@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the DahuaDoor binding’s snapshot subsystem by adding a DHIP “event file” download pipeline (NewFile-based) alongside the existing live HTTP snapshot mode, and it standardizes the WebRTC SDP proxy URL around /dahuadoor/webrtc/session?thing=... with a fallback when no SIP client is available. It also updates thing definitions, i18n labels, and README documentation to expose/describe the new configuration options and file naming/retention behavior.
Changes:
- Add
snapshotMode=dhipand related download/toggle/path/retention configuration for DHIP NewFile event files (snapshots, hangup, unlock, recordings, video messages), plus grouped cleanup. - Align WebRTC URL publication to
/dahuadoor/webrtc/session?thing=...and add a “default stream” fallback when no SIP client is free/available. - Update VTO3211 lock-aware snapshot naming and refresh README/i18n/thing XML to match new options and formats.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| bundles/org.openhab.binding.dahuadoor/src/main/resources/OH-INF/thing/vto3211.xml | Adds new DHIP snapshot/event download configuration parameters for VTO3211. |
| bundles/org.openhab.binding.dahuadoor/src/main/resources/OH-INF/thing/vto2202.xml | Adds matching DHIP snapshot/event download configuration parameters for VTO2202. |
| bundles/org.openhab.binding.dahuadoor/src/main/resources/OH-INF/i18n/dahuadoor.properties | Adds i18n labels/descriptions/options for the new config parameters. |
| bundles/org.openhab.binding.dahuadoor/src/main/java/org/openhab/binding/dahuadoor/internal/media/PlayStreamServlet.java | Implements /webrtc/session default-stream fallback when no SIP client is available. |
| bundles/org.openhab.binding.dahuadoor/src/main/java/org/openhab/binding/dahuadoor/internal/DahuaVto3211Handler.java | Adds lock-aware channel/suffix mapping and bypasses API snapshot when in DHIP mode. |
| bundles/org.openhab.binding.dahuadoor/src/main/java/org/openhab/binding/dahuadoor/internal/DahuaVto2202Handler.java | Bypasses API snapshot when in DHIP mode and reuses shared API snapshot helper. |
| bundles/org.openhab.binding.dahuadoor/src/main/java/org/openhab/binding/dahuadoor/internal/dahuaeventhandler/DahuaEventClient.java | Adds DHIP FileManager.downloadFile support and refactors frame parsing to raw payloads. |
| bundles/org.openhab.binding.dahuadoor/src/main/java/org/openhab/binding/dahuadoor/internal/DahuaDoorConfiguration.java | Introduces new config fields (mode/toggles/paths/maxEvents) with defaults. |
| bundles/org.openhab.binding.dahuadoor/src/main/java/org/openhab/binding/dahuadoor/internal/DahuaDoorBaseHandler.java | Implements DHIP NewFile classification, download/store logic, retention cleanup, and WebRTC URL alignment. |
| bundles/org.openhab.binding.dahuadoor/README.md | Documents new snapshot modes/options, storage layout, naming scheme, and updated WebRTC URL. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Sven Schad <svnsssd@gmail.com>
markus7017
pushed a commit
to markus7017/openhab-addons
that referenced
this pull request
May 19, 2026
markus7017
pushed a commit
to markus7017/openhab-addons
that referenced
this pull request
Jun 13, 2026
cipianpascu
pushed a commit
to cipianpascu/openhab-addons
that referenced
this pull request
Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR extends the DahuaDoor binding snapshot pipeline:
Testing