Skip to content

feat: expose full motion video list for dual-lens devices - #2930

Open
quicksilver2000 wants to merge 2 commits into
al-one:masterfrom
quicksilver2000:feature/dual-camera-motion-list
Open

feat: expose full motion video list for dual-lens devices#2930
quicksilver2000 wants to merge 2 commits into
al-one:masterfrom
quicksilver2000:feature/dual-camera-motion-list

Conversation

@quicksilver2000

Copy link
Copy Markdown

Expose the full list of thirdPartPlayUnits as a new attribute motion_video_list in get_alarm_eventlist(), so devices with dual-lens cameras (e.g. M30 Pro door lock) can access both streams.

Backward compatible: motion_video_latest is unchanged.

Fixes #2929

Expose the full list of thirdPartPlayUnits as a new attribute
motion_video_list in get_alarm_eventlist(), so devices with
dual-lens cameras (e.g. M30 Pro door lock) can access both streams.

Backward compatible: motion_video_latest is unchanged.
@quicksilver2000

quicksilver2000 commented Aug 25, 2026

Copy link
Copy Markdown
Author

Title: feat: expose full motion video list for dual-lens devices

Summary

Expose the full list of thirdPartPlayUnits as a new state attribute motion_video_list in get_alarm_eventlist(), so devices with dual-lens cameras (e.g. Xiaomi Smart Door Lock M30 Pro, xiaomi.lock.m30fc) can access both video streams that belong to the same doorbell event.

Background

When the doorbell is pressed, the M30 Pro records two video streams at the same moment:

Lens Resolution Content
Upper lens 2048x1536 Face / close-up
Lower lens 1920x1080 Wide view of the door area

In the Mi Home app these two streams are merged into one full picture. However, the current integration only exposes the first event (motion_video_latest), so only a single lens is accessible.

The API returns two thirdPartPlayUnits with createTime differing by only ~140 ms (the two lenses of the same event):

[
  {"fileId": "...848629760", "createTime": 1787568629603, "eventType": "IgnoreEvent", ...},
  {"fileId": "...674565632", "createTime": 1787568629463, "eventType": "Stay:Face", ...}
]

The second one is currently discarded.

Changes

  • Add a new attribute motion_video_list containing the full list of events.
  • Keep motion_video_latest unchanged (backward compatible).
  • Generic design — does not assume the first two entries belong to the same event (single-lens devices and multi-event responses are unaffected).

Testing

  • Device: Xiaomi Smart Door Lock M30 Pro (xiaomi.lock.m30fc)
  • Verified motion_video_list contains both lens records, createTime differ by ~140 ms
  • Both m3u8 streams are downloadable

Related issue

Fixes #2929

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.

Feature request: Expose full motion video event list for dual-lens doorbells (e.g. M30 Pro)

1 participant