Repository navigation
Conversation
4662475 to
67f528d
Compare
Lash-L
left a comment
There was a problem hiding this comment.
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, andSmartWashParamssubclassRoborockBaseas@dataclassmodels with concrete types and noAnyorTypedDict.WashWaterTemperatureTraitis gated ondock_features.is_washable,device_features.is_hot_wash_towel_supported, andis_wash_water_temperature_offered(hiding it onPEARLELITEunlessdock_type == shell_2e_lite_dock). Option ordering and gating (room_temperature,warmwhen neitheris_high_tmp_water_supportednoris_steam_wash_supported,hot,steamwhenis_steam_wash_supported) match the app.CleaningFluidTraitis gated ondock_features.is_clean_fluid_auto_delivery_supportedand exposesoff(0),standard(1), andlarge(3).SmartWashParamsTraitis gated ondock_features.is_washable, exposesby_time(0),by_room(1), andnew_smart(2, gated onis_back_wash_new_smart_supported), andwash_interval_optionsreturns[600, 900, 1200, 1500]s (or600..3000s in300s steps forTopazS,TopazSV,TopazSPlus,TopazSC,TopazSPower, andUltronSPlus).WashTowelModeTrait.set_wash_towel_modevalidates againstwash_towel_mode_options, andself_clean_traysendsapp_amethyst_self_checkgated ondock_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_commandsucceeds.
- Pure option/gating helpers (
- Priority 3 (Wire Protocols & Resilient Enums):
RoborockDockWashWaterTemperatureCode,RoborockDockCleaningFluidCode, andRoborockDockSmartWashModeCodeinherit fromRoborockEnumwithunknown = -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 testspassed;mypyreported zero errors in PR #1045's files.
67f528d to
b8b4a17
Compare
Lash-L
left a comment
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).
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-diffconfirms commitsfbea2bb,d244532, andb8b4a17are patch-identical to the prior review, andbe749e4only updatesroborock/devices/traits/v1/__init__.pyfor #1036'sDustCollectionFrequencyTrait→DustCollectionTraitrename (keepingWashWaterTemperatureTraitin thediscover_featuresskip 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 (
RoborockEnumwithunknown = -1), and feature/product gating (get_wash_water_temperatures,is_wash_water_temperature_offered,get_wash_interval_optionsold-frequency product set,is_back_wash_new_smart_supported,is_clean_carousel_self_clean_supported) match the app and followAGENTS.mdconventions. - All CI checks (
lint,Lint Commit Messages,test/test-mqtton 3.11 & 3.14,Build Package,Test Semantic Release) are green onb8b4a17.
- Wire RPCs and payloads match the Roborock V1 app (
b8b4a17 to
037fde6
Compare
|
I tested this branch on a real Qrevo MaxV 2 (
1.
|
037fde6 to
6c90934
Compare
|
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 ( I did not add the 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: 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
left a comment
There was a problem hiding this comment.
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 ismain(ed5f859), #1045 does not touchroborock/device_features.py, every flag it uses is already onmain, 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_offerednow also excludes the Shell E dock (dock type 21, including Shell EA). Sharedhome_data_with_feature_bittest helper.0026643: newsupports_cleaning_fluid()gate (fluid container bits indss, robot bit 112 or dock auto-delivery, not Shell 4S).CleaningFluidTraitnow takesDeviceFeaturesTrait, offerslargeonly with bit 112, and is built explicitly indiscover_features(). Newstatus_overridesfixture.
Earlier findings (maintainer test report, 2026-11-23)
-
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.isMultiCleanFluidSupportedisDock.is(DK.Shell4S)(:282402-282418), so the hard-codedshell_4s_dockcheck is correct.supports_cleaning_fluid(roborock/devices/traits/v1/cleaning_fluid.py:11-26) is the union of the two paths, andcleaning_fluid_options(:43-49) gives[off, standard, large]only on the amount-page path. Payloadset_auto_delivery_cleaning_fluid {"status": n}is confirmed at:198288-198296, and code 3 iscleaning_fluid_muckle_titleat:909-923.- The only remaining gap is
hasCleanFulidModule. It is listed under "Left for later" and covered in the nits below.
- Amount page:
-
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 == 1becomes UIBackWashModeSmart("By Room") and anything else becomes Custom/Level ("every N min"). - On write (
:437339-437358), selectingBackWashModeSmartsendssmart_wash: 1, and anything else sends0.
So on the wire, 0 is by time and 1 is by room in every family.
RoborockDockSmartWashModeCodeis correct, and the Qrevo's{"smart_wash": 0, "wash_interval": 900}is "every 15 min" in its own app. - On read (
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 withnoHotWashTowel: trueis dock type 21, in both the non-AM and AM variants (:281352-281371).wash_water_temperature.py:33-47matches this. - Fluid container bits: confirmed. The app's
cleanFluidStatusis(dss >> 10) & 3, truthy when nonzero, and the existingStatusV1.clean_fluid_statusreturnsNonein 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 livedsstelemetry read once duringdiscover_features(). The app re-evaluatescleanFluidStatuson every render, but here a robot whose fluid bits happen to be 0 at startup never gets the trait in that session.has_amalready follows the same pattern onmain, 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 inroborock/devices/traits/v1/__init__.py, between the trait skip tuple and explicit-construction block andmain'sCollisionAvoidanceTrait(#1089). It already comes from #1036's base (4f7f77cconflicts withmainthe 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 intest_supports_cleaning_fluidcovers the Saros 10R, the Qrevo MaxV 2 (dss165), 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.
6c90934 to
e23863b
Compare
Lash-L
left a comment
There was a problem hiding this comment.
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'sCollisionAvoidanceTrait(#1089). The skip tuple inroborock/devices/traits/v1/__init__.pynow listsObstaclePhotoTrait,CollisionAvoidanceTrait,DustCollectionModeTrait,WashWaterTemperatureTraitandCleaningFluidTrait. This resolves the rebase conflict from the last review: a trial merge ofe23863binto currentmain(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
-
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). -
Discovery-time
dssdependency (my nit). Addressed with the comment at__init__.py:339-340. -
hasCleanFulidModulenot checked (my nit). Still deferred, and still listed under "Left for later". Not blocking. -
Rebase conflict with
main. Resolved, see above. -
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:248034has{BackWashModeSmart: 0, BackWashModeCustom: 1, BackWashModeLevel: 2}.:218781givesback_wash_title1"By Room" andback_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 == 1becomes 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): choosingBackWashModeSmart(compared at:439091-439092) sets a flag at:439128-439130. That flag sendssetSmartWashParams(1, 1200)at:439150-439162. Any other choice sends0with the chosen minutes.setSmartWashParamsisset_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
RoborockDockSmartWashModeCodeuses. The Qrevo's{"smart_wash": 0, "wash_interval": 900}is shown as "every 15 min" in its own app, andby_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 settingby_roomfrom the library. It should read "By Room". - UI enum and labels.
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_optionsalways offersby_room. The a87 plugin offers "By Room" only withRSM.mapSaveEnabled. When map saving is off and the robot is set to by room, the app rewrites the setting tosetSmartWashParams(0, 900)(a87_plugin/output.js:418440-418470). A consumer can still setby_roomon 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:
CleaningFluidTraitis 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
pytestone23863b: 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) one23863b:lint,Lint Commit Messages,test(3.11, 3.14),test-mqtt(3.11, 3.14),Build PackageandTest Semantic Releasepass.releaseis 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.
e23863b to
f09674d
Compare
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
WashWaterTemperatureTrait(PropertiesApi.wash_water_temperature)get_wash_water_temperature;set_wash_water_temperature(temperature)sendsset_wash_water_temperaturewith{"values": <code>}. The device answers reads withwash_water_temperature, but rejects that key on writes (-10007 invalid params).RoborockDockWashWaterTemperatureCode: room_temperature 0, warm 1, hot 2, steam 3, pet_steam 4.wash_water_temperature_optionsfrom the pureget_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.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).CleaningFluidTrait(PropertiesApi.cleaning_fluid), cleaning fluid auto-deliveryget_auto_delivery_cleaning_fluid;set_cleaning_fluid(mode)sendsset_auto_delivery_cleaning_fluidwith{"status": <code>}.RoborockDockCleaningFluidCode: off 0, standard 1, large 3. Code 2 is not a selectable amount.status.clean_fluid_status,dssbits 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_fluidrejects the large amount there before sending.SmartWashParamsTrait(mop wash frequency)SmartWashParams.smart_washis nowRoborockDockSmartWashModeCode | None(by_time 0, by_room 1, new_smart 2) instead ofint | None. It is anIntEnum, so integer comparisons keep working for known codes; unmapped codes read asunknown.smart_wash_mode_options: by time and by room, plus new smart withis_back_wash_new_smart_supported.wash_interval_optionsfrom the pureget_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.DeviceFeaturesTraitand the product nickname, and is created indiscover_features(), likeWashTowelModeTrait.WashTowelModeTraitset_wash_towel_mode(mode)now rejects a mode outsidewash_towel_mode_optionsbefore sending.self_clean_tray()sendsapp_amethyst_self_check, gated bydock_features.is_clean_carousel_self_clean_supported.stop_wash()stops a running self-clean early.RoborockUnsupportedFeaturefor 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_paramscodes,set_wash_towel_modecodes,app_amethyst_self_check.Wire formats
get_wash_water_temperature→{"wash_water_temperature": n};set_wash_water_temperature{"values": n}get/set_auto_delivery_cleaning_fluid,{"status": n}get/set_smart_wash_params,{"smart_wash": n, "wash_interval": s}get/set_wash_towel_mode,{"wash_mode": n}WashTowelModes)app_amethyst_self_check, no params; stopped byapp_stop_washThe 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:
switch_status): a plainget_statusdoes not return it on the Saros 10R, onlyget_prop ["get_status"]does, so using it needs a separate change.Behavior changes for consumers
set_wash_towel_mode()now raisesRoborockUnsupportedFeaturefor a mode outsidewash_towel_mode_options. Callers that pick from that list (as Home Assistant does) are unaffected.SmartWashParams.smart_washis 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 currentmain). Each commit passes on its own.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 newproduct_modelfixture intests/devices/traits/v1/fixtures.pysets the test device's model.self_clean_tray()the robot state went fromchargingtowashing_the_mop(wash_phase11) 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.pyand its test,traits/v1/status.py,test_status.py); this PR adds no further conflicting files. The PR that merges later rebases.Related issues