Skip to content

Fix room detection for robots with 11+ field subsets#1457

Draft
JBG-brad wants to merge 1 commit into
DeebotUniverse:devfrom
JBG-brad:fix/room-subset-field-count
Draft

Fix room detection for robots with 11+ field subsets#1457
JBG-brad wants to merge 1 commit into
DeebotUniverse:devfrom
JBG-brad:fix/room-subset-field-count

Conversation

@JBG-brad

Copy link
Copy Markdown

Problem

Robots like the DEEBOT X11 OmniCyclone (model class huhcip) return 11-field room subsets from getMapSet_V2, but _handle_rooms_subsets only matches exactly 10 fields (len(subsets[0]) == 10).

This causes the code to fall through to the 8-field path which calls GetMapSubSet — a command the X11 doesn't support, returning error code 20003 ("rcp not support"). The result is empty room attributes on vacuum entities in Home Assistant.

Fix

Change == 10 to >= 10. The 10+ field branch only reads subset[0] (id) and subset[1] (name), so extra trailing fields are safely ignored.

The 11th field appears to be related to floor material/carpet detection, consistent with the X11's automatic carpet recognition feature.

Tested on

  • DEEBOT X11 OmniCyclone (huhcip), firmware 1.67.0
  • deebot-client 17.1.0 installed in Home Assistant OS
  • Two vacuums, both now show correct room names after this fix

Robots like the DEEBOT X11 OmniCyclone (model class huhcip) return
11-field room subsets from getMapSet_V2, but _handle_rooms_subsets
only matches exactly 10 fields. This causes the code to fall through
to the 8-field path which calls GetMapSubSet — a command the X11
doesn't support (error 20003 "rcp not support"), resulting in empty
room attributes on vacuum entities.

Change == 10 to >= 10. The 10+ field branch only reads subset[0] (id)
and subset[1] (name), so extra trailing fields are safely ignored.
JBG-brad added a commit to JBG-brad/client.py that referenced this pull request Feb 28, 2026
Newer robots like the DEEBOT X11 OmniCyclone use the freeClean clean
type instead of spotArea for room cleaning via clean_V2. Without this,
room cleaning commands fail with error 20011 "unknown type".

Adds CleanAreaFreeClean command class and FREE_CLEAN enum value, and
updates the huhcip hardware definition to use it.

Follow-up to DeebotUniverse#1457.
) -> HandlingResult:
# there are two versions of this message, depending on the number of values
if subsets and len(subsets[0]) == 10:
if subsets and len(subsets[0]) >= 10:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if subsets and len(subsets[0]) >= 10:
if subsets and len(subsets[0]) in (10, 11):

We should be specific as Ecovacs is constantly changing api
Can you please verify if the values are still matching to your format and add a comment for the 11 field

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot figure out what the 11th field is. It appears to be binary as I only see 0 or 1 values, but only one room in on each of my vacuums has the value set to 1. All of the other rooms are set to 0.

Is it okay that I don't know what it's for?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set it to unknown like the others. Are the other fields the same?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just commenting to add that adding that fix on line 276 enables the functionality in HA 2026.3 where you can map rooms from Ecovacs to Areas in HA for the X11
image

@Gw3n4 Gw3n4 Mar 16, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot figure out what the 11th field is. It appears to be binary as I only see 0 or 1 values, but only one room in on each of my vacuums has the value set to 1. All of the other rooms are set to 0.

Is it okay that I don't know what it's for?

The room coordinates are composed of 2 digits:
the map number (in my case 1st floor is map 1, 2nd floor is map 2) and the room number.

For instance, in the vavuum card, I define the shortcuts to clean a specific room like this:

  • name: Clean dining room
    service: vacuum.send_command
    service_data:
    command: clean_V2
    params:
    act: start
    content:
    type: freeClean
    value: 1,3
    icon: mdi:table-furniture
    target:
    device_id: cd66f34d9c274afd63333669b2aaeca7

Where 1 is the map number, 3 is the room number

I hope this helps.

],
ids=["10-field", "11-field"],
)
def test_handle_rooms_subsets_field_count(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not test internal functions instead add a test similar to the others

33Moka33 pushed a commit to 33Moka33/client.py that referenced this pull request Mar 4, 2026
Newer robots like the DEEBOT X11 OmniCyclone use the freeClean clean
type instead of spotArea for room cleaning via clean_V2. Without this,
room cleaning commands fail with error 20011 "unknown type".

Adds CleanAreaFreeClean command class and FREE_CLEAN enum value, and
updates the huhcip hardware definition to use it.

Follow-up to DeebotUniverse#1457.
@edenhaus

Copy link
Copy Markdown
Member

Drafting it as requested, changes are not implemented. Set it to ready to review after implementing it

@edenhaus edenhaus marked this pull request as draft March 25, 2026 07:44
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.

4 participants