Skip to content

Configure CleanAreaV2 on the 4 mower models#1596

Merged
edenhaus merged 1 commit into
DeebotUniverse:devfrom
Beennnn:feat/cleanarea-v2-mowers
Jul 1, 2026
Merged

Configure CleanAreaV2 on the 4 mower models#1596
edenhaus merged 1 commit into
DeebotUniverse:devfrom
Beennnn:feat/cleanarea-v2-mowers

Conversation

@Beennnn

@Beennnn Beennnn commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds area=CleanAreaV2 to CapabilityCleanAction for the 4 mower hardware models — xmp9ds (GOAT A1600 RTK), 5xu9h3 (GOAT G1), 51rcxt (GOAT A3000 LiDAR Pro), 300lc5 (GOAT O500 Panorama).

Before this change the mower CapabilityCleanAction had only command=CleanV2 and consumers could not launch a specific zone — they had to fall back to the full-map action.

Why

Mowers accept the exact same clean_V2 payload shape as vacuums for spot-area cleaning:

{"act":"s","content":{"type":"spotArea","value":"<zone_id>"}}

Verified on a real GOAT A1600 (FW 1.15.13) by MQTT sniff while the official app launched zone "Trampo":

  • The mower's getCleanInfo response reported cleanState.content = {"type":"spotArea","value":"1"} confirming the same envelope as the existing vacuum CleanAreaV2 implementation produces.
  • The complementary getAreaSet type:"ar" exposes the named zones with stable numeric IDs (LZMA+base64 encoded in subsets), giving consumers a name → id lookup table at runtime.

So the lib already had the right command (CleanAreaV2) — only the hardware capability declarations needed updating.

What changed

  • deebot_client/hardware/xmp9ds.py
  • deebot_client/hardware/5xu9h3.py
  • deebot_client/hardware/51rcxt.py
  • deebot_client/hardware/300lc5.py

Each file gets CleanAreaV2 added to the from deebot_client.commands.json.clean import … and area=CleanAreaV2 attached to the existing CapabilityCleanAction(command=CleanV2, …).

8 lines changed total (4 imports + 4 area parameters).

Tests

  • pytest tests/hardware/ → 7 passed
  • pytest tests/commands/json/test_clean.py → 27 passed
  • The CleanAreaV2 class itself is already covered by the vacuum-side suite; this PR just wires its existing behavior to the mower capability so no new test logic is needed for the command itself.

Notes

🤖 Generated with Claude Code

@codecov

codecov Bot commented May 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.02%. Comparing base (fffb7f5) to head (ca71450).
⚠️ Report is 19 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1596   +/-   ##
=======================================
  Coverage   95.02%   95.02%           
=======================================
  Files         159      159           
  Lines        6234     6234           
  Branches      353      353           
=======================================
  Hits         5924     5924           
  Misses        248      248           
  Partials       62       62           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented May 14, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 113 untouched benchmarks


Comparing Beennnn:feat/cleanarea-v2-mowers (ca71450) with dev (2850be8)1

Open in CodSpeed

Footnotes

  1. No successful run was found on dev (81156bf) during the generation of this report, so 2850be8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Adds `area=CleanAreaV2` to `CapabilityCleanAction` for the GOAT family
(xmp9ds A1600 RTK, 5xu9h3 G1, 51rcxt A3000 LiDAR Pro, 300lc5 O500
Panorama). The mowers already accept the same `clean_V2` payload with
`{"act":"s","content":{"type":"spotArea","value":"<zone_id>"}}` — verified
via MQTT sniff on a real A1600 (Trampo zone id=1 confirmed).

Consumers (e.g. home-assistant/core) can now invoke
`device.capabilities.clean.action.area(CleanMode.SPOT_AREA, [zone_id], 1)`
to launch a specific zone on a mower without falling back to the
`Map complete` action.

`getAreaSet type:"ar"` returns the zone definitions (LZMA+base64
encoded) with stable numeric IDs that map to the named zones in the
Ecovacs app, enabling clients to build a zone-name → id lookup at
runtime.

The `CleanAreaV2` API itself is unchanged — this is a pure capability
exposure on hardware definitions.
@Beennnn Beennnn force-pushed the feat/cleanarea-v2-mowers branch from 7ab01f7 to ca71450 Compare June 30, 2026 20:47
@Beennnn

Beennnn commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on top of dev (was 43 commits behind). No conflicts, suite still 692/692 green locally.

Quick recap:

  • Adds area=CleanAreaV2 to CapabilityCleanAction on the 4 mower hardware models — xmp9ds, 5xu9h3, 51rcxt, 300lc5.
  • Mowers accept the exact same clean_V2 payload shape as vacuums for spot-area cleaning. Before this they only had command=CleanV2, so consumers had no way to launch a single zone (e.g. "mow only the lower lawn") — they had to fall back to the full-map action.
  • Pure capability wiring change; no command or event class added.

Available for review when convenient.

@edenhaus edenhaus added the pr: enhancement PR with Improve something label Jul 1, 2026
@edenhaus edenhaus changed the title feat(hardware): expose CleanAreaV2 on the 4 mower models Configure CleanAreaV2 on the 4 mower models Jul 1, 2026
@edenhaus edenhaus merged commit 7fb6b38 into DeebotUniverse:dev Jul 1, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: enhancement PR with Improve something

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants