Skip to content

feat: expose Q10 current cleaning room - #939

Open
hCoureau wants to merge 5 commits into
Python-roborock:mainfrom
hCoureau:feat/q10-current-room
Open

feat: expose Q10 current cleaning room#939
hCoureau wants to merge 5 commits into
Python-roborock:mainfrom
hCoureau:feat/q10-current-room

Conversation

@hCoureau

@hCoureau hCoureau commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • infer the currently cleaned room from the live robot position and segmented map grid
  • use conservative exact-cell and nearby-cell matching with explicit boundary handling
  • expose room state only during an active cleaning session and clear stale session state
  • preserve custom room labels while keeping diagnostics redacted

Important

This is a stacked pull request. It depends on #938, #937, #936, and #933. The isolated change for review is commit cd2621d. It will be rebased onto main after its predecessors merge, before merge.

Design against the #933 review priorities

  • End-user API: map.current_room returns the existing typed Q10Room or None; it does not add a second room model or expose inference details to callers.
  • Trait lifecycle: the value is available only in active/paused cleaning states with a fresh live trace. Inactive or docked updates clear freshness so a previous session cannot leak into a later one.
  • Parser boundary: session validity remains in the trait, while the pure spatial resolver consumes typed map/trace models and returns a defensive room copy. No raw packet data crosses the boundary.
  • Parser internals: the exact segmented grid cell wins; the bounded nearby-cell fallback returns None on room ambiguity or unusable calibration.

Validation

  • 1051 passed, including 92 snapshot tests
  • all pre-commit hooks passed
  • package build passed

The behavior was also exercised against a physical Roborock Q10 S5. No private map captures, room labels, or account data are included.

Related work

AI assistance disclosure

This contribution was prepared with OpenAI Codex assistance. I reviewed the submitted changes and test results and take responsibility for the contribution.

@hCoureau hCoureau mentioned this pull request Aug 31, 2026
23 tasks
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