Skip to content

Add Xiaomi IPC017 legacy camera support - #2379

Open
FrancYescO wants to merge 1 commit into
AlexxIT:masterfrom
FrancYescO:codex/xiaomi-ipc017-legacy
Open

Add Xiaomi IPC017 legacy camera support#2379
FrancYescO wants to merge 1 commit into
AlexxIT:masterfrom
FrancYescO:codex/xiaomi-ipc017-legacy

Conversation

@FrancYescO

@FrancYescO FrancYescO commented Jul 27, 2026

Copy link
Copy Markdown

Add Xiaomi IPC017 legacy camera support

image

Summary

  • register chuangmi.camera.ipc017 IMI Home Security Camera 1080P as a supported Xiaomi legacy camera
  • use the IMILAB A1/Mijia media start and quality commands
  • decrypt encrypted video packets while leaving the camera's proprietary
    unencrypted PCMA audio packets unchanged
  • add regression tests for IPC017 payload handling and model detection

Background

chuangmi.camera.ipc017 currently falls back to the Xiaomi legacy client but
is rejected as an unsupported model.

The camera uses the same media control commands as the IMILAB A1/Mijia branch.
Its payload encryption differs slightly: video packets use the Xiaomi
ChaCha20 wrapper, while audio packets with the proprietary Xiaobai PCMA codec
ID are already unencrypted. Applying crypto.Decode to both tracks therefore
fails with unsupported encryption.

Validation

  • go test ./pkg/xiaomi/...
  • CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./...
  • tested on a physical chuangmi.camera.ipc017, firmware 3.5.8_0097
  • sustained MP4 streaming without EOF
  • detected output: HEVC, 1920×1080 with subtype=hd

Example source, with account and device values redacted:

streams:
  camera: xiaomi://<account>:<region>@<camera-ip>?did=<did>&model=chuangmi.camera.ipc017&subtype=hd

Notes

The wider repository test suite was also attempted on Darwin with Go 1.26.
Unrelated existing platform/toolchain failures were observed in FFmpeg,
HomeKit, stream, AAC, credentials, and go vet tests. The Xiaomi package
suite and the Linux cross-build pass.

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.

1 participant