feat(mower): add GOAT O1200 control support - #1791
Open
monsivar wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add physically verified mower-control support for the ECOVACS GOAT O1200 LiDAR (2i0fns).
This adds support for:
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
cleancommand, notclean_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
GoatCleanusing the observedcleanwire format.GoatCleanAreafor single- and multi-area mowing.GoatCleanModeEventto retain the active mower mode (autoorspotArea) for pause/resume/stop.onCleanInfo.2i0fns) clean capability to the GOAT-specific commands.Clean/CleanV2behavior unchanged for other devices.Unsupported mower modes are rejected rather than inferred.
customArea,freeClean, non-integer area IDs, empty area lists, andcleanings != 1are 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 remainedauto.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 remainedspotArea.Tests
git diff --check: passedThe full
tests/hardware/test_init.pyrun was attempted locally but is blocked by existing malformed placeholder hardware files (itk04l.pyand02qwum.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
CleanMowerimplementation for other mower devices. The O1200 traffic captured here differs in an important way: pause/resume/stop must preserve the activeautoorspotAreacontent 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.