Skip to content

feat: add V1 dock mop wash settings and tray self-clean - #1045

Open
infy1995 wants to merge 4 commits into
Python-roborock:mainfrom
infy1995:feat/v1-mop-wash-settings
Open

infy1995 wants to merge 4 commits into
Python-roborock:mainfrom
infy1995:feat/v1-mop-wash-settings

Conversation

@infy1995

@infy1995 infy1995 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Part of the "Dock controls" item in #738: V1 dock mop wash settings and the wash tray self-clean, so consumers can set how often and how the dock washes the mops and start or stop a tray self-clean.

The four commits add about 1,300 lines, about two thirds of them table-driven tests; each commit is one trait or feature.

Changes

  • New WashWaterTemperatureTrait (PropertiesApi.wash_water_temperature)
    • Reads get_wash_water_temperature; set_wash_water_temperature(temperature) sends set_wash_water_temperature with {"values": <code>}. The device answers reads with wash_water_temperature, but rejects that key on writes (-10007 invalid params).
    • New RoborockDockWashWaterTemperatureCode: room_temperature 0, warm 1, hot 2, steam 3, pet_steam 4.
    • wash_water_temperature_options from the pure get_wash_water_temperatures(dock_features): room temperature and hot always, warm only on docks with neither high temperature water nor steam, steam only on steam docks, pet steam never.
    • Created only for washing docks on devices with is_hot_wash_towel_supported. The PearlE Pro (PEARLELITE, a169/a170) can heat wash water only with a Shell2E Lite dock, so it gets the trait only with that dock (is_wash_water_temperature_offered).
    • The same helper excludes a Shell E dock (dock type 21, also the Shell EA variant), which gets no temperature trait. The robot firmware reports hot wash support, but that dock cannot heat wash water, so a temperature control would offer settings the dock cannot apply.
  • New CleaningFluidTrait (PropertiesApi.cleaning_fluid), cleaning fluid auto-delivery
    • Reads get_auto_delivery_cleaning_fluid; set_cleaning_fluid(mode) sends set_auto_delivery_cleaning_fluid with {"status": <code>}.
    • New RoborockDockCleaningFluidCode: off 0, standard 1, large 3. Code 2 is not a selectable amount.
    • Created only when the robot reports a cleaning fluid container (status.clean_fluid_status, dss bits 10-11 not 0) and either the robot has the cleaning fluid delivery feature (is_clean_fluid_delivery_supported) or the dock does auto-delivery (supports_cleaning_fluid). Shell 4S docks, which have several cleaning fluids, get no trait here.
    • cleaning_fluid_options: off, standard and large on robots with the delivery feature; on other robots only off and standard, because they read the large amount back as standard. set_cleaning_fluid rejects the large amount there before sending.
  • SmartWashParamsTrait (mop wash frequency)
    • SmartWashParams.smart_wash is now RoborockDockSmartWashModeCode | None (by_time 0, by_room 1, new_smart 2) instead of int | None. It is an IntEnum, so integer comparisons keep working for known codes; unmapped codes read as unknown.
    • smart_wash_mode_options: by time and by room, plus new smart with is_back_wash_new_smart_supported. wash_interval_options from the pure get_wash_interval_options(product_nickname): 600, 900, 1200, 1500 s; 600 to 3000 s in steps of 300 on TopazS, TopazSV, TopazSPlus, TopazSC, TopazSPower and UltronSPlus.
    • set_smart_wash_params(mode, wash_interval) sends both values together.
    • The trait now takes DeviceFeaturesTrait and the product nickname, and is created in discover_features(), like WashTowelModeTrait.
  • WashTowelModeTrait
    • set_wash_towel_mode(mode) now rejects a mode outside wash_towel_mode_options before sending.
    • New self_clean_tray() sends app_amethyst_self_check, gated by dock_features.is_clean_carousel_self_clean_supported. stop_wash() stops a running self-clean early.
  • All setters raise RoborockUnsupportedFeature for a value the device does not offer, send nothing in that case, and update the trait state only after the command succeeds.
  • docs/V1_API_COMMANDS.md: entries for the new commands and formats, get/set_smart_wash_params codes, set_wash_towel_mode codes, app_amethyst_self_check.

Wire formats

Setting Read / write Codes
Wash water temperature get_wash_water_temperature → {"wash_water_temperature": n}; set_wash_water_temperature {"values": n} 0 room temperature, 1 warm, 2 hot, 3 steam, 4 pet steam
Cleaning fluid auto-delivery get/set_auto_delivery_cleaning_fluid, {"status": n} 0 off, 1 standard, 3 large
Mop wash frequency get/set_smart_wash_params, {"smart_wash": n, "wash_interval": s} 0 by time, 1 by room, 2 new smart; interval 600/900/1200/1500 s
Wash water amount get/set_wash_towel_mode, {"wash_mode": n} 0 light, 1 balanced, 2 deep, 8 super deep, 10 smart (existing WashTowelModes)
Tray self-clean app_amethyst_self_check, no params; stopped by app_stop_wash

The codes, option lists and write formats were compared with the Roborock app's V1 device plugins. The values listed under Testing were confirmed on a Saros 10R (roborock.vacuum.a144, dock type 16).

Left for later

The option lists above are the ones for newer models such as the Saros 10R. Some older models differ in a few places that need model family detection or status fields the library does not have yet; they are left for a follow-up:

  • UltronSV (a97) offers warm also on its high temperature docks (K1R, Shell4RC).
  • Older models offer by room only with map saving on, and never new smart.
  • Wash water amount options depending on the auto-empty state, soak and wash, and newer feature bits.
  • The cleaning fluid trait does not check the robot's cleaning fluid module flag (switch_status): a plain get_status does not return it on the Saros 10R, only get_prop ["get_status"] does, so using it needs a separate change.

Behavior changes for consumers

  • set_wash_towel_mode() now raises RoborockUnsupportedFeature for a mode outside wash_towel_mode_options. Callers that pick from that list (as Home Assistant does) are unaffected.
  • SmartWashParams.smart_wash is an enum instead of a plain int (see above).

Testing

  • uv run pre-commit run --all-files: all hooks pass.
  • uv run pytest: 3120 passed (rebased on current main). Each commit passes on its own.
  • New and extended tests in tests/devices/traits/v1/ (test_wash_water_temperature.py, test_cleaning_fluid.py, test_smart_wash_params.py, test_wash_towel_mode.py): option lists, setter commands, rejection of unoffered values without sending, state unchanged after a failed command, unknown firmware codes, trait availability per dock type, per hot wash feature and per product (PearlE Pro, older models), no temperature on a Shell E dock, and the cleaning fluid trait per dock, robot feature and container status (Qrevo MaxV 2, Saros 10R, Shell 4S). A new product_model fixture in tests/devices/traits/v1/fixtures.py sets the test device's model.
  • Saros 10R:
    • Read: temperature 2 (hot), fluid 1 (standard), smart wash by room / 1200 s, wash mode smart.
    • Write: temperature warm and room temperature, fluid large and off, mop wash by time every 15 min, wash mode light, balanced and deep, each set through the library and confirmed in the Roborock app; then restored.
    • Tray self-clean: after self_clean_tray() the robot state went from charging to washing_the_mop (wash_phase 11) and the app showed the self-clean; stop_wash() ended it within 3 s.

Conflicts with open PRs

Test-merged with every open PR touching the same files. #1087, #1065, #1062, #1055 and #1054 merge cleanly. #1092, #1086, #1064, #1024 and #959 already conflict with current main (v1_containers.py, testing/v1_simulator.py and its test, traits/v1/status.py, test_status.py); this PR adds no further conflicting files. The PR that merges later rebases.

Related issues

@infy1995
infy1995 marked this pull request as draft November 13, 2026 20:13
@infy1995 infy1995 mentioned this pull request Nov 14, 2026
9 tasks
@infy1995
infy1995 force-pushed the feat/v1-mop-wash-settings branch from 4662475 to 67f528d Compare November 15, 2026 01:40
@Lash-L Lash-L added Feature New feature V1 V1 platform labels Nov 15, 2026
@infy1995 infy1995 changed the title feat: add V1 mop wash settings feat: add V1 dock mop wash settings and tray self-clean Nov 17, 2026

@Lash-L Lash-L left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated code review by Gemini 4 Hydrogen in Antigravity using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).

Stacking note: This branch is stacked on #1036 (1b2efd87, 3dfce1d5, 4897723f); this review covers only PR #1045's own commits (11661023, 93e2e3ae, 42957e16, 67f528d9).

Summary

No issues found. All new traits, enums, option lists, command payloads, and feature/dock gating match the Roborock app's V1 behavior and follow repository conventions.

  • Priority 1 (Public Trait APIs & Consumer Contracts):
    • WashWaterTemperature, CleaningFluidDelivery, and SmartWashParams subclass RoborockBase as @dataclass models with concrete types and no Any or TypedDict.
    • WashWaterTemperatureTrait is gated on dock_features.is_washable, device_features.is_hot_wash_towel_supported, and is_wash_water_temperature_offered (hiding it on PEARLELITE unless dock_type == shell_2e_lite_dock). Option ordering and gating (room_temperature, warm when neither is_high_tmp_water_supported nor is_steam_wash_supported, hot, steam when is_steam_wash_supported) match the app.
    • CleaningFluidTrait is gated on dock_features.is_clean_fluid_auto_delivery_supported and exposes off (0), standard (1), and large (3).
    • SmartWashParamsTrait is gated on dock_features.is_washable, exposes by_time (0), by_room (1), and new_smart (2, gated on is_back_wash_new_smart_supported), and wash_interval_options returns [600, 900, 1200, 1500] s (or 600..3000 s in 300 s steps for TopazS, TopazSV, TopazSPlus, TopazSC, TopazSPower, and UltronSPlus).
    • WashTowelModeTrait.set_wash_towel_mode validates against wash_towel_mode_options, and self_clean_tray sends app_amethyst_self_check gated on dock_features.is_clean_carousel_self_clean_supported.
  • Priority 2 (Data Lifecycle & State Management):
    • Pure option/gating helpers (get_wash_water_temperatures, is_wash_water_temperature_offered, get_wash_interval_options) return values without side effects.
    • Setters validate supported options before sending and perform optimistic state updates only after send_command succeeds.
  • Priority 3 (Wire Protocols & Resilient Enums):
    • RoborockDockWashWaterTemperatureCode, RoborockDockCleaningFluidCode, and RoborockDockSmartWashModeCode inherit from RoborockEnum with unknown = -1.
    • Wire payloads match the app (set_wash_water_temperature {"values": n} vs read {"wash_water_temperature": n}, set_auto_delivery_cleaning_fluid {"status": n}, set_smart_wash_params {"smart_wash": n, "wash_interval": s}, app_amethyst_self_check {}).
  • Tests & Checks:
    • uv run --python 3.12 pytest tests/devices/traits/v1/test_wash_water_temperature.py tests/devices/traits/v1/test_cleaning_fluid.py tests/devices/traits/v1/test_smart_wash_params.py tests/devices/traits/v1/test_wash_towel_mode.py tests/conformance/ -> 672 passed, 53 xfailed.
    • uv run --python 3.12 ruff check roborock tests passed; mypy reported zero errors in PR #1045's files.

@Lash-L Lash-L added /review run Code review skill (/review) has been run Passed /review Passed the /review skill check labels Nov 18, 2026
@infy1995
infy1995 force-pushed the feat/v1-mop-wash-settings branch from 67f528d to b8b4a17 Compare November 18, 2026 08:02
@infy1995
infy1995 marked this pull request as ready for review November 21, 2026 17:26

@Lash-L Lash-L left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated code review by Gemini 4 Neon in Antigravity using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).

Follow-up Review (b8b4a17, delta from 67f528d, now ready for review)

Stacking note: Still stacked on #1036 (now rebased onto 4f7f77c); this follow-up covers PR #1045's own commits (be749e4, fbea2bb, d244532, b8b4a17).

Verdict: Passes /review — no issues found.

  • Delta since 67f528d: Clean rebase onto updated #1036 (360e096, 4f7f77c). git range-diff confirms commits fbea2bb, d244532, and b8b4a17 are patch-identical to the prior review, and be749e4 only updates roborock/devices/traits/v1/__init__.py for #1036's DustCollectionFrequencyTrait → DustCollectionTrait rename (keeping WashWaterTemperatureTrait in the discover_features skip tuple so its extra gating is not bypassed by the generic loop).
  • Independent Verification (Layers 1–3 & App Behavior):
    • Wire RPCs and payloads match the Roborock V1 app (set_wash_water_temperature {"values": t}, get_wash_water_temperature, set_auto_delivery_cleaning_fluid {"status": t}, get_auto_delivery_cleaning_fluid, set_smart_wash_params {"smart_wash": t, "wash_interval": n}, app_amethyst_self_check).
    • Option lists, enum codes (RoborockEnum with unknown = -1), and feature/product gating (get_wash_water_temperatures, is_wash_water_temperature_offered, get_wash_interval_options old-frequency product set, is_back_wash_new_smart_supported, is_clean_carousel_self_clean_supported) match the app and follow AGENTS.md conventions.
    • All CI checks (lint, Lint Commit Messages, test / test-mqtt on 3.11 & 3.14, Build Package, Test Semantic Release) are green on b8b4a17.

@Lash-L

Lash-L commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

I tested this branch on a real Qrevo MaxV 2 (roborock.vacuum.a87, firmware 02.34.04, Pearl Plus dock type 9, US region) and checked it against the a87's own app plugin (US product 110), which I downloaded and decompiled. Most of it works: every wash temperature, mop wash frequency, wash water amount, dust collection mode and auto-empty value it offers is accepted and reads back. I found two problems.

This is an automated review and can be incorrect. If anything here looks wrong, please reply and say so.

1. CleaningFluidTrait is created on a dock without a dispenser, and offers an amount the robot ignores

On the Qrevo, set_auto_delivery_cleaning_fluid {"status": 0} sticks, but {"status": 3} returns ok and reads back as 1. The robot treats the setting as on/off.

The app never shows this setting on this robot. In the a87 plugin's dock settings page:

  • On/off switch (auto_delivery_cleaning_fluid). Shown when dock isCleanFluidAutoDeliverySupported and robot hasCleanFulidModule and cleanFluidStatus and not robot isCleanFluidDeliverySupported.
  • Amount page (delivery_cleaning_fluid_setting, options 0 Off / 1 Standard / 3 High Volume). Shown when robot isCleanFluidDeliverySupported and hasCleanFulidModule and cleanFluidStatus.

Both also need these two status values:

  • hasCleanFulidModule: status.clean_fluid == 1, or status.switch_status & 2 (parseSwitchStatus).
  • cleanFluidStatus: (status.dss >> 10) & 3.

The Qrevo's get_status has no clean_fluid or switch_status field, and dss is 165, so the fluid bits are 0. is_clean_fluid_delivery_supported is False. The app therefore shows neither control. The PR gates only on dock_features.is_clean_fluid_auto_delivery_supported, which is True for Pearl Plus.

The newer plugin (Saros Z70, a179) also excludes Dock.isMultiCleanFluidSupported (Shell 4S) from both controls and gives multi-fluid docks their own page.

Suggestion:

  • Gate the trait like the app: add clean_fluid and switch_status to the status model and decode the fluid bits of dss.
  • Offer [off, standard, large] only on the amount-page path (robot is_clean_fluid_delivery_supported). Offer [off, on] on the switch path.

2. Mop wash mode codes mean different things in older plugins

The a87 plugin defines BackWashModeMap = {BackWashModeSmart: 0, BackWashModeCustom: 1, BackWashModeLevel: 2}:

  • Code 0 is titled "By Room" (back_wash_title1), and is offered only when RSM.mapSaveEnabled.
  • Code 1 is titled "By Time (min)" (back_wash_title2).
  • On the dock settings page, code 0 is shown as "By Room" and any other code as "every N min" (setting_back_wash_interval).

The newer a179 plugin uses {ByTime: 0, ByRoom: 1, NewSmart: 2}, which is what RoborockDockSmartWashModeCode follows.

This Qrevo reports {"smart_wash": 0, "wash_interval": 900}. Its own app shows that as By Room, but this PR reports it as by_time, 900 s. Both codes are accepted by the robot, so this can't be caught by a round-trip test. The labels are simply swapped for models whose plugin still has the old map.

Suggestion: choose the code meanings per product, or at least use the old map for products whose plugin predates the change. The a87 is one such product.

Checked and matching the app (no change needed)

Unrelated to this PR: app_amethyst_self_check is also sent by AM docks' self-clean button (SelfCleanButtonView, gated on hasAM), which this PR doesn't expose. That's a possible follow-up.

@infy1995
infy1995 force-pushed the feat/v1-mop-wash-settings branch from 037fde6 to 6c90934 Compare November 23, 2026 09:12
@infy1995

Copy link
Copy Markdown
Contributor Author

Thanks for testing this on a real Qrevo MaxV 2 and for the detailed report.

1. Cleaning fluid: confirmed and fixed. The trait is now created only when the robot reports a cleaning fluid container (dss bits 10-11 not 0) and either the robot has the cleaning fluid delivery feature (bit 112) or the dock does auto-delivery. Shell 4S docks get no trait here. On robots without bit 112 the options are only off and standard, and large is rejected before anything is sent. The Qrevo (dss 165) therefore gets no trait, and the Saros 10R keeps off, standard and large.

I did not add the switch_status check: a plain get_status does not return it on the Saros 10R (only get_prop ["get_status"] does), so using it needs a separate change. I listed it under "Left for later" in the description.

2. Mop wash mode codes: no change needed. I compared the plugins of all app families, not only the a87. The older plugins number the modes differently in their UI, but they convert when reading and writing: smart_wash 1 means by room and 0 means by time on the wire in every family. So the Qrevo's {"smart_wash": 0, "wash_interval": 900} is "every 15 min" in its own app, and reading it as by_time / 900 s is right. A round trip can't tell the two readings apart, but the app's own display and the codes it sends do.

3. Self-clean button on AM docks. Agreed that it is a possible follow-up. It is not part of this PR.

The fix is folded into the existing commits; the description is updated.

@Lash-L Lash-L left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated code review by Claude Opus 5.5 in Claude Code using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).

Follow-Up Review (6c90934, delta from b8b4a17)

Verdict: Passes /review with nits.

Stacking note: Still stacked on #1036 (1b2efd8..4f7f77c, unmerged). This covers only #1045's own four commits. It is not stacked on #1054: the merge base with #1054 is main (ed5f859), #1045 does not touch roborock/device_features.py, every flag it uses is already on main, and a trial merge of #1045 with #1054 has no conflicts.

What changed since b8b4a17 (git range-diff): da0d655 (smart wash params) and 6c90934 (tray self-clean, wash mode validation) are patch-identical. The force-push changed only two commits, both in response to the 2026-11-23 Qrevo MaxV 2 test report:

  • bd1ef50: is_wash_water_temperature_offered now also excludes the Shell E dock (dock type 21, including Shell EA). Shared home_data_with_feature_bit test helper.
  • 0026643: new supports_cleaning_fluid() gate (fluid container bits in dss, robot bit 112 or dock auto-delivery, not Shell 4S). CleaningFluidTrait now takes DeviceFeaturesTrait, offers large only with bit 112, and is built explicitly in discover_features(). New status_overrides fixture.

Earlier findings (maintainer test report, 2026-11-23)

  1. Cleaning fluid trait created on a dock without a dispenser, offers an amount the robot ignores. Fixed. I checked the gate against the app (hermes/com.roborock.tanos/output.js:993084-993170):

    • Amount page: FM.isCleanFluidDeliverySupported && RSM.hasCleanFulidModule && RSM.cleanFluidStatus && !Dock.isMultiCleanFluidSupported.
    • On/off switch: Dock.isCleanFluidAutoDeliverySupported && hasCleanFulidModule && cleanFluidStatus && !FM.isCleanFluidDeliverySupported && !isMultiCleanFluid.
    • Dock.isMultiCleanFluidSupported is Dock.is(DK.Shell4S) (:282402-282418), so the hard-coded shell_4s_dock check is correct.
    • supports_cleaning_fluid (roborock/devices/traits/v1/cleaning_fluid.py:11-26) is the union of the two paths, and cleaning_fluid_options (:43-49) gives [off, standard, large] only on the amount-page path. Payload set_auto_delivery_cleaning_fluid {"status": n} is confirmed at :198288-198296, and code 3 is cleaning_fluid_muckle_title at :909-923.
    • The only remaining gap is hasCleanFulidModule. It is listed under "Left for later" and covered in the nits below.
  2. Mop wash mode codes swapped on older plugins. No change needed; the author is right. The old-map plugin (hermes/com.roborock.rubys/output.js, BackWashModeMap = {Smart: 0, Custom: 1, Level: 2} at :238470) converts in both directions:

    • On read (:432976-433010), smart_wash == 1 becomes UI BackWashModeSmart ("By Room") and anything else becomes Custom/Level ("every N min").
    • On write (:437339-437358), selecting BackWashModeSmart sends smart_wash: 1, and anything else sends 0.

    So on the wire, 0 is by time and 1 is by room in every family. RoborockDockSmartWashModeCode is correct, and the Qrevo's {"smart_wash": 0, "wash_interval": 900} is "every 15 min" in its own app.

Delta verification against RR_API

  • Shell E exclusion: confirmed. In the app, isHotWashTowelSupported = bit 41 && !Dock.isNoSupportHotWashTowel (tanos/output.js:206150-206172). The only dock entry with noHotWashTowel: true is dock type 21, in both the non-AM and AM variants (:281352-281371). wash_water_temperature.py:33-47 matches this.
  • Fluid container bits: confirmed. The app's cleanFluidStatus is (dss >> 10) & 3, truthy when nonzero, and the existing StatusV1.clean_fluid_status returns None in the same cases.

Priority 1: Public Trait APIs & Consumer Contracts

No issues. supports_cleaning_fluid is a pure, value-returning helper. The trait boundary types are concrete, and the setters still reject unoffered values before sending and update state only after the command succeeds.

Priority 2: Data Lifecycle & State Management

  • Nit / question: roborock/devices/traits/v1/__init__.py:328-336. The trait's existence now depends on live dss telemetry read once during discover_features(). The app re-evaluates cleanFluidStatus on every render, but here a robot whose fluid bits happen to be 0 at startup never gets the trait in that session. has_am already follows the same pattern on main, so this is not blocking. A one-line comment noting the trade-off would help the next reader, unless you know the bits are stable (for example while the robot is off the dock).
  • Nit (already listed under "Left for later"): the gate does not check the app's hasCleanFulidModule (status.clean_fluid == 1 || status.switch_status & 2, tanos/output.js:302016-302033). The fluid bits should cover it in practice, and the deferral is documented, so this is not blocking.

Priority 3: Wire Protocols, Codecs & Resilient Enums

No issues in the delta.

Tests & PR hygiene

  • Needs rebase (not a code defect). GitHub reports CONFLICTING. The conflict is in roborock/devices/traits/v1/__init__.py, between the trait skip tuple and explicit-construction block and main's CollisionAvoidanceTrait (#1089). It already comes from #1036's base (4f7f77c conflicts with main the same way), so it will need to be resolved when #1036 lands and this branch is rebased.
  • Test placement is fine: everything is in the mirror suites under tests/devices/traits/v1/, and the gate table in test_supports_cleaning_fluid covers the Saros 10R, the Qrevo MaxV 2 (dss 165), Shell 4S and the K1 AM variant.
  • Local run on 6c90934 (Python 3.12):
    • uv run pytest: 2530 passed, 53 xfailed.
    • ruff check: clean.
    • mypy: no errors in files this PR touches. The 19 errors it reports are pre-existing (protobuf stubs, mqtt, a01 tests).
  • CI is green on 6c90934.

This is an automated review and can be incorrect, so please reply if any finding looks wrong.

@Lash-L Lash-L left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated code review by Claude Opus 5.5 in Claude Code using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).

Follow-Up Review (e23863b, delta from 6c90934)

Verdict: Passes /review with nits.

Stacking note: Still stacked on #1036, which is open with head 4f3dccf. This review covers only #1045's own four commits (7cc20a9, 80fe5fd, dbf8ebb, e23863b).

What changed since 6c90934 (git range-diff 4f7f77c..6c90934 4f3dccf..e23863b): there are no logic changes. The force-push did four things:

  • Rebased onto #1036's new base, which now includes main's CollisionAvoidanceTrait (#1089). The skip tuple in roborock/devices/traits/v1/__init__.py now lists ObstaclePhotoTrait, CollisionAvoidanceTrait, DustCollectionModeTrait, WashWaterTemperatureTrait and CleaningFluidTrait. This resolves the rebase conflict from the last review: a trial merge of e23863b into current main (b46ae6f) is clean.
  • Added a body to each commit message.
  • docs/V1_DEVICE_FEATURES.md: the "Impact" lines for bits 41, 109 and 112 now name the traits that use them.
  • roborock/devices/traits/v1/__init__.py:339-340: a comment saying the cleaning fluid trait is decided once at discovery and does not come back on later status updates. This addresses my Priority 2 nit.

Earlier findings

  1. Cleaning fluid trait created on a dock without a dispenser (maintainer test, 2026-11-23). Fixed in 6c90934, unchanged here, and now confirmed live: the trait is not created on the Qrevo MaxV 2 (see below).

  2. Discovery-time dss dependency (my nit). Addressed with the comment at __init__.py:339-340.

  3. hasCleanFulidModule not checked (my nit). Still deferred, and still listed under "Left for later". Not blocking.

  4. Rebase conflict with main. Resolved, see above.

  5. Mop wash mode codes on the a87 (Qrevo MaxV 2). I checked this again, this time in the a87's own plugin as well as the newer one. The PR is correct and no change is needed. The original finding compared the plugin's internal UI enum with the wire codes. The a87 plugin converts between the two in both directions:

    • UI enum and labels. prtest/a87_plugin/output.js:248034 has {BackWashModeSmart: 0, BackWashModeCustom: 1, BackWashModeLevel: 2}. :218781 gives back_wash_title1 "By Room" and back_wash_title2 "By Time (min)". So UI value 0 is "By Room", but this is component state, not what is sent.
    • Read (dock wash page :439375-439395; dock settings summary :903084-903120; also :418425-418440): smart_wash == 1 becomes UI 0, "By Room". Any other value becomes UI 1, or UI 2 when the interval is not a multiple of 5 minutes, both shown "every N min" (:905328-905360).
    • Write (:439083-439162): choosing BackWashModeSmart (compared at :439091-439092) sets a flag at :439128-439130. That flag sends setSmartWashParams(1, 1200) at :439150-439162. Any other choice sends 0 with the chosen minutes. setSmartWashParams is set_smart_wash_params {"smart_wash": a0, "wash_interval": a1} (:239575-239585).
    • Newer plugin, RR_API/hermes/com.roborock.tanos/output.js:309583: {BackWashModeByTime: 0, BackWashModeByRoom: 1, BackWashModeNewSmart: 2}, used as wire codes directly.

    So on the wire, 0 is by time and 1 is by room on both plugins, which is what RoborockDockSmartWashModeCode uses. The Qrevo's {"smart_wash": 0, "wash_interval": 900} is shown as "every 15 min" in its own app, and by_time / 900 s is right. The author's reply on 2026-11-23 and my previous review reached the same conclusion. Not blocking, and not a should-fix. I would withdraw finding 2 of the 2026-11-23 test report. To settle it on the device, check the app's mop wash frequency row after setting by_room from the library. It should read "By Room".

New in this delta

Nothing beyond the items above. There are no new code paths, and the trait logic, option lists and wire formats match 6c90934.

Priority 1: Public Trait APIs & Consumer Contracts

No issues.

Priority 2: Data Lifecycle & State Management

  • Nit (already under "Left for later"): roborock/devices/traits/v1/smart_wash_params.py:47-53. smart_wash_mode_options always offers by_room. The a87 plugin offers "By Room" only with RSM.mapSaveEnabled. When map saving is off and the robot is set to by room, the app rewrites the setting to setSmartWashParams(0, 900) (a87_plugin/output.js:418440-418470). A consumer can still set by_room on such a robot. This is documented as a follow-up, so it is not blocking.

Priority 3: Wire Protocols, Codecs & Resilient Enums

No issues. The wire codes for all four settings are confirmed against both plugins (see earlier finding 5 for the mop wash mode).

Live test on a Qrevo MaxV 2

roborock.vacuum.a87, firmware 02.34.04, Pearl Plus dock (type 9), US region, at e23863b:

  • Wash water temperature: set 2, then 0, then restored to 2. Each value was accepted and read back. Steam was refused before sending, because this dock is not a steam dock.
  • Cleaning fluid: CleaningFluidTrait is not created. The robot has no fluid module and the app shows no fluid control, so this matches the app and confirms the fix for earlier finding 1.
  • Mop wash frequency: set (by_time, 900), then (by_room, 1200), then restored. The device read back each value. An interval of 700 s was refused before sending.
  • Wash water amount: set smart, then light, then restored. All OK.
  • Not exercised live: tray self-clean, because it runs the dock. The Saros 10R test in the PR description covers it.

Local results and CI

  • pytest on e23863b: 3099 passed, 46 xfailed, 11 deselected.
  • ruff check: all checks passed. ruff format --check: 290 files already formatted.
  • Trial merge into main (b46ae6f): clean.
  • CI (gh pr checks) on e23863b: lint, Lint Commit Messages, test (3.11, 3.14), test-mqtt (3.11, 3.14), Build Package and Test Semantic Release pass. release is skipped.

This is an automated review and can be incorrect, so please reply if any finding looks wrong.

Expose the temperature the dock washes the mop with, so consumers can read
and set it. Add RoborockDockWashWaterTemperatureCode and
WashWaterTemperatureTrait; writes use the "values" key because the device
rejects "wash_water_temperature". The trait is created only for washing
docks on robots that support hot mop washing, and not on Shell E docks or,
without a Shell2E Lite dock, on the PearlE Pro, which cannot heat the water.
Let consumers read and set how much cleaning fluid is added automatically.
CleaningFluidTrait is created only when the robot reports a fluid container
and either the robot or the dock delivers fluid, because other setups ignore
the setting. Shell 4S docks, with several fluids, are left out. The large
amount is offered only to robots with cleaning fluid delivery; others read
it back as standard.
Allow changing how often the dock washes the mop. Decode smart_wash into
RoborockDockSmartWashModeCode, list the modes and intervals the product
offers, and add set_smart_wash_params(), which rejects other values before
sending. Older products accept intervals from 10 to 50 minutes.
Add self_clean_tray() so consumers can start the dock's tray self-clean, and
reject wash towel modes the device does not offer instead of sending them.
stop_wash() also stops a running self-clean.
@infy1995
infy1995 force-pushed the feat/v1-mop-wash-settings branch from e23863b to f09674d Compare November 25, 2026 20:38
@github-actions github-actions Bot added documentation Improvements or additions to documentation Data model changes Changes to data models, device info, or feature mappings labels Nov 25, 2026

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 documentation Improvements or additions to documentation Feature New feature Passed /review Passed the /review skill check /review run Code review skill (/review) has been run V1 V1 platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants