Skip to content

fix: decode V1 in_cleaning codes for map building and room + zone cleans - #1097

Open
infy1995 wants to merge 1 commit into
Python-roborock:mainfrom
infy1995:fix/v1-in-cleaning-resume-codes
Open

infy1995 wants to merge 1 commit into
Python-roborock:mainfrom
infy1995:fix/v1-in-cleaning-resume-codes

Conversation

@infy1995

Copy link
Copy Markdown
Contributor

in_cleaning can report 4 (unfinished quick map build) and 11 (rooms and zones cleaned in one task). Both decoded as unknown and logged a warning. This adds both values to RoborockInCleaning.

Fixes #929

App cross-check

Compared with the Roborock app plugin: 4 is present in every V1 bundle checked, 11 only in some newer ones. The warning for 4 was seen on a Saros while a map was being generated. 11 has not been seen on a device.

Conflicts with open PRs

in_cleaning can report 4 (unfinished quick map build) and 11 (rooms and zones cleaned in one
task). Both decoded as unknown and logged a warning.
@github-actions github-actions Bot added Data model changes Changes to data models, device info, or feature mappings V1 V1 platform labels Nov 30, 2026
@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
roborock/data/v1/v1_code_mappings.py 100.00% <100.00%> (ø)
tests/data/test_code_mappings.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@saruk-vedant saruk-vedant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for digging into this, and for the app cross-check in the description. The mapping itself looks right to me: 4 slots in cleanly after the existing 0-3 sequence, the names follow the existing *_not_complete pattern, and moving the unknown-code probe from 4 to 5 keeps that test honest instead of letting it silently pass on a now-known code. The new parametrized test is a nice touch too, it pins both codes by name rather than just checking they no longer fall back to unknown.

Two questions before I give this a full thumbs up:

  1. Code 11 is the one I am least sure about, since the description says it has not been seen on a device and only shows up in some newer app bundles. What pins the name segment_zone_clean_not_complete down? Is there a string or label in the bundle that names it that way, or is the name inferred from the code sitting next to the segment and zone entries? If it is inferred, it might be worth saying so in a comment, so a future reader knows 11 is bundle-derived rather than device-observed like 4.

  2. On the test probe moving to 5: was 5 checked against the app bundles as still unknown, or is it just the next free number now that 4 is taken? If it is only the next free number, the test still works as a tripwire, but it would be good to know whether 5 was verified or just picked.

Neither is a blocker for me, the decode for 4 alone fixes the warning reported in #929, and 11 follows the same app-derived pattern the rest of this file already uses. Happy to approve once those two points are answered.

@infy1995

infy1995 commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review.

  1. The name comes from the app plugin itself: the table that maps in_cleaning values has a Segment_Zone_Clean entry at 11 (in the six newer bundles that have it). I added the _not_complete suffix to match codes 1-3. Code 11 is bundle-derived only and has not been seen on a device, unlike 4.
  2. 5 was checked: no in_cleaning table in the V1 bundles I compared contains 5-10, only 0-4 and 11, so it is still unknown in the app too.

This branch has not been deployed

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

Labels

Data model changes Changes to data models, device info, or feature mappings V1 V1 platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RoborockInCleaning is missing code 4 (a298)

2 participants