Repository navigation
feat: add GET_CLEAN_DETAIL and GET_RT_CLEAN_DETAIL commands - #1063
Merged
Lash-L merged 2 commits intoNov 22, 2026
Merged
Conversation
get_rt_clean_detail returns the event timeline of the current or last run; get_clean_detail returns it for a past run, selected by its begin time.
Lash-L
reviewed
Nov 21, 2026
Lash-L
left a comment
Collaborator
There was a problem hiding this comment.
Automated code review by Gemini 4 Neon in Antigravity using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).
Summary by Architectural Layer
- PR Scope & Hygiene: Clean, focused PR (+28 lines across 2 files) adding only the two V1 command enum entries and a parametrized test, with a Conventional Commits title/commit (
feat:) and no conformance allowlist changes. - Priority 1 — Public Trait APIs & Consumer Contracts: No new traits or domain models added. Reuses the existing
CommandTrait.send()contract (RoborockCommand | str,ParamsType); deferring a typed trait until event schemas are confirmed across additional models is well-scoped. - Priority 2 — Data Lifecycle & State Management: No state, lifecycle, concurrency, or caching changes.
- Priority 3 — Wire Protocols, Codecs & Resilient Enums: Adds
GET_CLEAN_DETAIL = "get_clean_detail"andGET_RT_CLEAN_DETAIL = "get_rt_clean_detail"toRoborockCommand(roborock/roborock_typing.py). As an outgoing V1 RPC command identifier enum (not a wire status/error decoder),RoborockCommand(str, Enum)is appropriate. - Tests & Fixtures: Adds
test_send_clean_detailin the mirrored suitetests/devices/traits/v1/test_command.py, using@pytest.mark.parametrizeand the existingcommand_traitfixture consistent with peer tests in the module.
Protocol Verification (RR_API)
Cross-verified against the Roborock app bundles (hermes/com.roborock.tanos, nonhermes/com.roborock.tanos, and model bundles including Saros 10R, Saros 20, Qrevo Edge 2/3 Pro, Qrevo 2 Pro, Qrevo S Pro):
- RPC method strings: Exact match —
getCleanTimerLineDetailinvokesget_clean_detailandgetRTCleanTimerLineDetailinvokesget_rt_clean_detail(module_441.js). - Parameters & response: Confirmed in
CleanTimelineView(module_2496.js) and History Summary (module_3617.js):{"type": 0, "from": <offset>}forget_rt_clean_detail,{"begin": <startTime>, "type": 0, "id": 0, "from": <offset>}forget_clean_detail, and response fieldsmore,events(t,i,e),from, andnum.
Verdict
No findings survived review and adversarial self-check. This PR is clean and ready to approve.
Lash-L
reviewed
Nov 22, 2026
| (RoborockCommand.GET_CLEAN_DETAIL, {"begin": 1794867592, "type": 0, "id": 0, "from": 0}), | ||
| ], | ||
| ) | ||
| async def test_send_clean_detail(command_trait: CommandTrait, command: RoborockCommand, params: dict) -> None: |
Collaborator
There was a problem hiding this comment.
I went ahead and removed it myself, will merge now. TY!
Lash-L
approved these changes
Nov 22, 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.
Summary
Adds two V1 commands for the clean timeline:
GET_RT_CLEAN_DETAIL(get_rt_clean_detail), params{"type": 0, "from": <offset>}: the event timeline of the current run, or of the last run when the robot is idle.GET_CLEAN_DETAIL(get_clean_detail), params{"begin": <run begin>, "type": 0, "id": 0, "from": <offset>}: the same for a past run. Thebeginvalues are the ones inget_clean_summaryrecords. Withouttypeandidthe robot answers-10005 param error!.The response is
{"begin", "from", "num", "more", "events": [{"t", "i", "e"}]}, whereeis a JSON string. Usefromandmoreto read the next page.Event ids seen on a Saros 10R (a144)
I checked these against runs where I logged what the robot did:
ie{"2": <segment>}{"2": <segment>}{"2": <segment>}app_skip_current_cleaning_area, or the robot found the room done){"121": <code>}app_charge{"111": <from>, "112": <to>, "1": <battery>}Example: during a two-room clean,
63for the first room appeared at the same second the skip was sent, followed by43for that room and41for the next. During a live run, the last41without a following43gives the room in progress.This PR adds only the commands. A typed trait could come later, once more models confirm the event ids.
Checks
uv run pytest: 2363 passedruff check,ruff format --check: cleanmypyon the changed files: clean