Skip to content

feat: add dust collection settings to the B01 Q7 api - #919

Open
akj wants to merge 2 commits into
Python-roborock:mainfrom
akj:q7-dust-collection
Open

feat: add dust collection settings to the B01 Q7 api#919
akj wants to merge 2 commits into
Python-roborock:mainfrom
akj:q7-dust-collection

Conversation

@akj

@akjakj commented Aug 15, 2026

Copy link
Copy Markdown

What

Adds two setters to Q7PropertiesApi for the auto-empty dock, following the existing prop.set setter conventions (set_child_lock, set_volume):

  • set_dust_collection(enabled) — writes dust_auto_state
  • set_dust_collection_frequency(cleans) — writes dust_frequency (1 = empty after every clean); validates >= 1

Plus parametrized tests in tests/devices/traits/b01/q7/test_init.py matching the existing setter tests.

Verified on real hardware

Tested against a Roborock Q7 M5+ (roborock.vacuum.sc05, fw 03.01.80, US region):

  • dust_auto_state round-trips 1 → 0 → 1 via set_dust_collection, confirmed by GET_PROP read-back after each write.
  • dust_frequency round-trips 1 → 2 → 1 via set_dust_collection_frequency, same method.

Deliberately not included: manual "empty now"

Writing dust_action via prop.set is rejected by the device with code 1 (B01 command failed with code 1), so dust_action appears to be read-only state. The product schema for sc05 exposes write-only DPS 201 start_clean_task, 202 start_back_dock_task, 203 start_dock_task — a manual empty trigger most likely goes through 203 start_dock_task, which the Q7 channel doesn't support sending yet. Happy to test candidate encodings against my device in a follow-up if someone knows the expected payload shape.

Side observation from the same session, can file separately: this healthy, docked device steadily reports fault: "fault_2103" (unmapped placeholder in B01Fault, adjacent to 2102 cleaning_complete) — the 2103 reading appeared right after a completed clean while charging, so it looks like another benign 2100-series notification rather than a real fault.

Adds set_dust_collection (auto-empty on/off) and
set_dust_collection_frequency (cleans per emptying) to Q7PropertiesApi,
using prop.set like the other Q7 setters.
Both verified against a real Q7 M5+ (roborock.vacuum.sc05, fw 03.01.80):
dust_auto_state and dust_frequency round-trip correctly. Note that
writing dust_action (empty now) is rejected by the device with code 1,
so a manual-empty trigger is intentionally not included; it likely
requires the dock-task DPS (203 start_dock_task) instead.
@akj

akj commented Aug 16, 2026

Copy link
Copy Markdown
Author

Live-hardware follow-up from the same Q7 M5+: I monitored a full app-started clean (102 min, 59 m²) end-to-end over MQTT, polling prop.get at 3 s cadence through docking, and caught the auto-empty cycle:

status=DOCKING station_act=0 dust_action=0 fault=2102 # clean complete, returning
status=CHARGING station_act=3 dust_action=1 # dock emptying (~30 s)
status=CHARGING station_act=0 dust_action=0 fault=2103 # finished, docked idle
  • station_act=3 + dust_action=1 are the read-only "dust collection in progress" indicators — consistent with dust_action rejecting writes (code 1). The clean record afterwards reports record_dust_num: 1.
  • The dock triggers the cycle internally on docking after a completed clean; no cloud-visible command precedes it, and a stopped clean does not trigger it (tested).
  • 2102 (cleaning_complete) fired exactly at completion/return; 2103 fired once the task finished on the dock and persists while docked-idle. Both are task notifications, not faults — fix: name B01 Q7 code 2103 and document dock dust-collection state fields #921 names 2103 and documents the dock fields.

Happy to run more captures on this hardware if other codes or values need confirming.

@akj
akj marked this pull request as ready for review August 16, 2026 16:09
Sign up for freeto 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

@akj