Skip to content

feat(mower): add GOAT O1200 control support - #1791

Open
monsivar wants to merge 3 commits into
DeebotUniverse:devfrom
monsivar:feature/ecovacs-mower-controls
Open

feat(mower): add GOAT O1200 control support#1791
monsivar wants to merge 3 commits into
DeebotUniverse:devfrom
monsivar:feature/ecovacs-mower-controls

Conversation

@monsivar

Copy link
Copy Markdown
Contributor

Summary

Add physically verified mower-control support for the ECOVACS GOAT O1200 LiDAR (2i0fns).

This adds support for:

  • automatic mowing
  • single-area mowing
  • multi-area mowing
  • start
  • pause
  • resume
  • stop

The implementation is based on captured traffic from the official ECOVACS app and direct verification against a physical O1200.

Observed protocol

The O1200 uses the clean command, not clean_V2.

Automatic mowing

{act:start,content:{type:auto}}
{act:pause,content:{type:auto}}
{act:resume,content:{type:auto}}
{act:stop,content:{type:auto}}

Area mowing

Single-area start:

{act:start,content:{type:spotArea,value:1}}

Multi-area start was physically verified with area IDs 1,2:

{act:start,content:{type:spotArea,value:1,2}}

Pause/resume/stop preserve the active spotArea mode:

{act:pause,content:{type:spotArea}}
{act:resume,content:{type:spotArea}}
{act:stop,content:{type:spotArea}}

The area ID order is preserved when serializing multiple areas.

Implementation

  • Add GoatClean using the observed clean wire format.
  • Add GoatCleanArea for single- and multi-area mowing.
  • Add GoatCleanModeEvent to retain the active mower mode (auto or spotArea) for pause/resume/stop.
  • Record the observed mode from onCleanInfo.
  • Wire the O1200 (2i0fns) clean capability to the GOAT-specific commands.
  • Keep existing generic Clean / CleanV2 behavior unchanged for other devices.

Unsupported mower modes are rejected rather than inferred. customArea, freeClean, non-integer area IDs, empty area lists, and cleanings != 1 are not accepted.

Physical verification

Two complete control sequences were executed through this implementation against the O1200.

Automatic mowing: START -> PAUSE -> RESUME -> STOP

All commands returned ret=ok, and the tracked GOAT mode remained auto.

Multi-area mowing: areas 1,2, START -> PAUSE -> RESUME -> STOP

The start command used exactly:

{act:start,content:{type:spotArea,value:1,2}}

All commands returned ret=ok; state transitioned through cleaning/paused/cleaning/idle and the tracked GOAT mode remained spotArea.

Tests

  • mower-control tests: 49 passed
  • targeted mypy: passed
  • git diff --check: passed

The full tests/hardware/test_init.py run was attempted locally but is blocked by existing malformed placeholder hardware files (itk04l.py and 02qwum.py) in the checkout; those files are unrelated to this diff.

Scope / related work

This PR is intentionally limited to O1200 mower controls and does not include settings, map work, or Home Assistant changes.

There is some conceptual overlap with #1515, which introduces a more generic CleanMower implementation for other mower devices. The O1200 traffic captured here differs in an important way: pause/resume/stop must preserve the active auto or spotArea content type, and area mowing uses the observed comma-separated area IDs. This PR therefore keeps the change model-specific and does not alter other mower profiles.

Related to #1610.

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.35%. Comparing base (5453eba) to head (d49a292).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1791      +/-   ##
==========================================
+ Coverage   96.26%   96.35%   +0.08%     
==========================================
  Files         161      161              
  Lines        6399     6439      +40     
  Branches      368      376       +8     
==========================================
+ Hits         6160     6204      +44     
+ Misses        172      170       -2     
+ Partials       67       65       -2     

☔ 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 Aug 24, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 226 untouched benchmarks


Comparing monsivar:feature/ecovacs-mower-controls (d49a292) with dev (5453eba)

Open in CodSpeed

Sign up for free to 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