Skip to content

Add SDT4E425 dual-sensor streams and RPC2 PTZ presets - #590

Open
Realcrash wants to merge 2 commits into
rroller:mainfrom
Realcrash:issue-589-sdt4e425-support
Open

Add SDT4E425 dual-sensor streams and RPC2 PTZ presets#590
Realcrash wants to merge 2 commits into
rroller:mainfrom
Realcrash:issue-589-sdt4e425-support

Conversation

@Realcrash

Copy link
Copy Markdown

Summary

Adds model-specific support for the Dahua SDT4E425 dual-sensor PTZ camera family.

  • Detects DH-SDT4E425-4F-GB-A-PV1 and compatible model strings.
  • Exposes three streams for each physical sensor:
    • Panorama Main, Sub and Sub_2
    • PTZ Main, Sub and Sub_2
  • Maps Panorama to RTSP channel 1 and PTZ to RTSP channel 2.
  • Uses the camera's RPC2 Web 5.0 flow for PTZ preset enumeration and GotoPreset.
  • Avoids the unsupported CGI ptz.cgi?action=getStatus request for this model.
  • Keeps the existing behavior unchanged for other Dahua models.

Hardware validation

Tested on:

DH-SDT4E425-4F-GB-A-PV1

Validated stream matrix:

Entity RTSP mapping
Panorama channel=1&subtype=0
Panorama Sub channel=1&subtype=1
Panorama Sub_2 channel=1&subtype=2
PTZ channel=2&subtype=0
PTZ Sub channel=2&subtype=1
PTZ Sub_2 channel=2&subtype=2

All six streams were visually verified when the corresponding encoder profiles were enabled on the camera.

The camera returns the expected RTSP 404 response when a Sub or Sub_2 encoder profile is disabled. The entity remains present because the integration exposes the device's declared stream slots.

PTZ validation:

  • 5 configured presets were enumerated dynamically.
  • GotoPreset was successfully tested for the available presets.
  • RPC2 login, factory instance creation and logout completed successfully.
  • No invalid-session errors were observed.
  • Normal logging remains quiet; detailed RPC2 messages are DEBUG-only.

Tests

Adds tests covering:

  • SDT4E425 model matching
  • RPC2 login and PTZ preset payloads
  • six camera entities with distinct channel/subtype mappings
  • preservation of behavior for other models

Fixes #589

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support request for Dahua DH-SDT4E425-4F-GB-A-PV1 dual-sensor/PTZ camera

1 participant